-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathJenkinsfile.client
More file actions
46 lines (38 loc) · 1.3 KB
/
Jenkinsfile.client
File metadata and controls
46 lines (38 loc) · 1.3 KB
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
node("currikidev") {
def app
stage('Clone repository') {
checkout scm
}
stage('Build image') {
app = docker.build("quay.io/curriki/client")
}
stage('Test image') {
app.inside {
sh 'echo "Api Tests passed"'
}
}
stage('Push image') {
docker.withRegistry('https://quay.io', 'docker-private-credentials') {
app.push("${env.BUILD_NUMBER}")
app.push("${tag}")
}
}
parallel(
"StageA": {
if(Jenkins.instance.getNode("${node}").toComputer().isOnline()){
node("${node}") {
stage ("${node}") {
echo 'Copy'
sh "yes | docker service update --image quay.io/curriki/client:${tag} currikistack_currikiprod-client"
echo 'Copy completed'
}
}
} else {
stage ("${node}") {
echo "${node} is offline"
exit 1
}
}
}
)
}