-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
38 lines (30 loc) · 1.03 KB
/
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
node {
def app
stage('Clone repository') {
/* Let's make sure we have the repository cloned to our workspace */
checkout scm
}
stage('Copy file for docker build') {
sh "cp cleaner.sh build_container/cleaner.sh"
sh "cp cron_script.sh build_container/cron_script.sh"
sh "cp backup.go build_container/backup.go"
}
stage('Build image') {
app = docker.build("nutellinoit/sidecar-backup-volumes","--pull build_container/")
}
stage('Push image') {
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
app.push("latest")
app.push("${env.BUILD_NUMBER}")
}
}
stage('Build image Beekup') {
app = docker.build("beeckup/sidecar-backup-volumes","--pull build_container/")
}
stage('Push image Beekup') {
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
app.push("latest")
app.push("${env.BUILD_NUMBER}")
}
}
}