-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
40 lines (31 loc) · 980 Bytes
/
Jenkinsfile
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
node {
def app
stage('Clone repository') {
/* Let's make sure we have the repository cloned to our workspace */
checkout scm
}
stage('Copy dir') {
sh "cp -r code build_migrator/rootfs"
}
stage('Build image') {
app = docker.build("nutellinoit/imap-migrator","--pull build_migrator/")
}
stage('Push image') {
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
app.push("${env.BUILD_NUMBER}")
app.push("latest")
}
}
stage('Build image Beeckup') {
app = docker.build("beeckup/imap-migrator","--pull build_migrator/")
}
stage('Push image Beekcup') {
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
app.push("${env.BUILD_NUMBER}")
app.push("latest")
}
}
stage('Delete dir') {
sh "rm -rf build_migrator/rootfs || true"
}
}