Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit f28a47e

Browse files
committed
Add Jenkinsfile build normal and squashed images
1 parent afdc72d commit f28a47e

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Jenkinsfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
pipeline {
2+
agent any
3+
4+
stages {
5+
stage("Build") {
6+
steps {
7+
sh "docker build -t netlify/build:latest ."
8+
sh "docker build --squash -t netlify/build:squash ."
9+
}
10+
}
11+
12+
stage("Push") {
13+
when {
14+
branch 'master'
15+
}
16+
failFast true
17+
parallel {
18+
stage("Push Squash") {
19+
steps {
20+
sh "docker push netlify/build:squash"
21+
}
22+
}
23+
stage("Push Latest") {
24+
steps {
25+
sh "docker push netlify/build:squash"
26+
}
27+
}
28+
}
29+
}
30+
}
31+
32+
post {
33+
failure {
34+
slackSend color: "danger", message: "Build failed - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}/console|Open>)"
35+
}
36+
success {
37+
slackSend color: "good", message: "Build succeeded - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}/console|Open>)"
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)