forked from guitarmarx/netcup-ipfailover-image
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
24 lines (24 loc) · 715 Bytes
/
Jenkinsfile
File metadata and controls
24 lines (24 loc) · 715 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
pipeline {
agent {label 'build'}
environment{
dockerRegistry='registry.meteorit-leipzig.de'
image="failover"
version="${BRANCH_NAME == 'master' ? 'latest' : BRANCH_NAME}"
}
stages {
stage('Build Image'){
steps{
script {
sh "docker build --no-cache -t $dockerRegistry/$image:$version ."
}
}
}
stage('Push image') {
steps {
withDockerRegistry([ credentialsId: 'docker-registry-credential', url: 'https://' + dockerRegistry ]) {
sh "docker push $dockerRegistry/$image:$version"
}
}
}
}
}