2020-12-02 18:52:16 +01:00
|
|
|
pipeline {
|
2020-12-02 19:41:09 +01:00
|
|
|
agent any
|
|
|
|
stages {
|
2020-12-02 19:28:44 +01:00
|
|
|
stage('Build image') {
|
2020-12-02 19:41:09 +01:00
|
|
|
steps {
|
|
|
|
echo "Building docker image"
|
|
|
|
script {
|
2020-12-02 20:01:33 +01:00
|
|
|
dir('SessionCompanion/SessionCompanion'){
|
2020-12-02 19:41:09 +01:00
|
|
|
def customImage = docker.build("session-companion:${env.BUILD_ID}")
|
2020-12-02 20:01:33 +01:00
|
|
|
//customImage.withRun('-p 5050:5050')
|
2020-12-02 19:43:47 +01:00
|
|
|
}
|
2020-12-02 19:41:09 +01:00
|
|
|
}
|
|
|
|
}
|
2020-12-02 19:28:44 +01:00
|
|
|
}
|
2020-12-02 19:41:09 +01:00
|
|
|
stage('Delete image') {
|
|
|
|
steps {
|
|
|
|
sh "docker rmi session-companion:${env.BUILD_ID}"
|
|
|
|
}
|
2020-12-02 19:17:49 +01:00
|
|
|
}
|
2020-12-02 18:52:16 +01:00
|
|
|
}
|
|
|
|
}
|