refs #6689 feat: delete view vn2008 #1992

Merged
josepd merged 4 commits from 6689-deleteViewsVn2008-6 into dev 2024-02-05 06:22:21 +00:00
1 changed files with 14 additions and 13 deletions
Showing only changes of commit 3c642fb838 - Show all commits

27
Jenkinsfile vendored
View File

@ -32,19 +32,6 @@ pre: {
// https://loopback.io/doc/en/lb3/Setting-debug-strings.html#debug-strings-reference // https://loopback.io/doc/en/lb3/Setting-debug-strings.html#debug-strings-reference
//env.DEBUG = 'strong-remoting:shared-method' //env.DEBUG = 'strong-remoting:shared-method'
} }
node {
stage('Setup') {
def packageJson = readJSON file: 'package.json'
env.VERSION = packageJson.version
env.GIT_COMMIT_MSG = sh(
script: 'git log -1 --pretty=%B ${GIT_COMMIT}',
returnStdout: true
).trim()
setEnv()
}
}
pipeline { pipeline {
agent any agent any
options { options {
@ -115,6 +102,10 @@ pipeline {
CREDENTIALS = credentials('docker-registry') CREDENTIALS = credentials('docker-registry')
} }
steps { steps {
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = packageJson.version
}
sh 'gulp build' sh 'gulp build'
dockerBuild() dockerBuild()
} }
@ -145,6 +136,10 @@ pipeline {
DOCKER_HOST = "${env.SWARM_HOST}" DOCKER_HOST = "${env.SWARM_HOST}"
} }
steps { steps {
script {
def packageJson = readJSON file: 'package.json'
env.VERSION = packageJson.version
}
sh "docker stack deploy --with-registry-auth --compose-file docker-compose.yml ${env.STACK_NAME}" sh "docker stack deploy --with-registry-auth --compose-file docker-compose.yml ${env.STACK_NAME}"
} }
} }
@ -167,6 +162,11 @@ pipeline {
success { success {
script { script {
if (env.BRANCH_NAME == 'master' && FROM_GIT) { if (env.BRANCH_NAME == 'master' && FROM_GIT) {
env.GIT_COMMIT_MSG = sh(
script: 'git log -1 --pretty=%B ${GIT_COMMIT}',
returnStdout: true
).trim()
String message = env.GIT_COMMIT_MSG String message = env.GIT_COMMIT_MSG
int index = message.indexOf('\n') int index = message.indexOf('\n')
if (index != -1) if (index != -1)
@ -183,6 +183,7 @@ pipeline {
} }
} }
unsuccessful { unsuccessful {
setEnv()
sendEmail() sendEmail()
} }
} }