-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathJenkinsfile
More file actions
47 lines (45 loc) · 860 Bytes
/
Jenkinsfile
File metadata and controls
47 lines (45 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
pipeline {
agent {
docker {
image 'node:8.11.3'
args '-p 3000:3000'
}
}
stages {
stage('Build') {
when {
beforeAgent true
branch 'master'
}
steps {
sh '''yarn
yarn build'''
}
}
stage('deploy') {
when {
beforeAgent true
branch 'master'
}
steps {
echo 'start deploy'
script {
try {
sh '''git config --global user.name \'Entry Dev\'
git config --global user.email \'entrydev@nts-corp.com\'
chmod +x ./cideploy
./cideploy'''
} catch(e) {
currentBuild.result = 'SUCCESS'
} finally {
echo 'end deploy'
}
}
}
}
}
environment {
GH_REPO = 'https://github.com/entrylabs/docs.git'
GH_REF = 'github.com/entrylabs/docs.git'
}
}