SES-79 Try different approach with Jenkinsfile
This commit is contained in:
parent
e72f038c21
commit
ddfb2bad7c
33
Jenkinsfile
vendored
33
Jenkinsfile
vendored
@ -1,13 +1,32 @@
|
|||||||
|
//pipeline {
|
||||||
|
// stages {
|
||||||
|
// stage('Build image') {
|
||||||
|
// checkout scm
|
||||||
|
// dir('SessionCompanion') {
|
||||||
|
// docker.build("session-companion:${env.BUILD_ID}")
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// stage('Build app') {
|
||||||
|
// docker.image("session-companion:${env.BUILD_ID}").withRun('-p 5050:5050')
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
pipeline {
|
pipeline {
|
||||||
|
agent any
|
||||||
stages {
|
stages {
|
||||||
stage('Build image') {
|
stage('Build image') {
|
||||||
checkout scm
|
steps {
|
||||||
dir('SessionCompanion') {
|
echo "Building docker image"
|
||||||
docker.build("session-companion:${env.BUILD_ID}")
|
script {
|
||||||
}
|
def customImage = docker.build("session-companion:${env.BUILD_ID}")
|
||||||
}
|
customImage.withRun('-p 5050:5050')
|
||||||
stage('Build app') {
|
}
|
||||||
docker.image("session-companion:${env.BUILD_ID}").withRun('-p 5050:5050')
|
}
|
||||||
|
}
|
||||||
|
stage('Delete image') {
|
||||||
|
steps {
|
||||||
|
sh "docker rmi session-companion:${env.BUILD_ID}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user