Publish docker images (#87)

This commit is contained in:
Benoit TELLIER
2025-08-30 15:18:04 +07:00
committed by GitHub
parent 18b24edd46
commit 7d679d1357
Vendored
+31 -9
View File
@@ -16,20 +16,42 @@ pipeline {
}
stages {
stage('Compile') {
steps {
sh 'npm install'
}
stage('Compile') {
steps {
sh 'npm install'
}
}
stage('Test') {
steps {
sh 'npm run test'
}
stage('Test') {
steps {
sh 'npm run test'
}
}
stage('Deploy docker images') {
when {
anyOf {
branch 'master'
buildingTag()
}
}
steps {
script {
env.DOCKER_TAG = 'branch-master'
if (env.TAG_NAME) {
env.DOCKER_TAG = env.TAG_NAME
}
echo "Docker tag: ${env.DOCKER_TAG}"
sh 'npm run build'
sh 'docker build -t linagora/twake-calendar-web:$DOCKER_TAG .'
sh 'docker login -u $DOCKER_HUB_CREDENTIAL_USR -p $DOCKER_HUB_CREDENTIAL_PSW'
sh 'docker push linagora/twake-calendar-web:$DOCKER_TAG'
}
}
}
}
post {
always {
deleteDir() /* clean up our workspace */
}
}
}
}