fup-try-012

This commit is contained in:
Philippe Caseiro 2023-06-19 16:15:46 +02:00
parent 3a9dc1ae21
commit 15be1b9f7d
1 changed files with 20 additions and 10 deletions

30
Jenkinsfile vendored
View File

@ -8,21 +8,31 @@ symfonyAppPipeline('ubuntu:22.04', [
'hooks': [ 'hooks': [
// Run docker image build, verification and publication stages // Run docker image build, verification and publication stages
'postSymfonyAppPipeline': { 'postSymfonyAppPipeline': {
stage('Build and publish docker images') {
steps {
make
make release
}
}
stage('Build and publish hydra-dispatcher image') { stage('Build and publish hydra-dispatcher image') {
// Retrieve current tag // Retrieve current tag
String currentTag = sh(script: 'git tag --points-at HEAD | head -n 1', returnStdout: true).trim() String currentTag = sh(script: 'git tag --points-at HEAD | head -n 1', returnStdout: true).trim()
// Retrieve default tag // Retrieve default tag
String defaultTag = sh(returnStdout: true, script: 'git describe --always').trim() String defaultTag = sh(returnStdout: true, script: 'git describe --always').trim()
job('Building docker images') { container.buildAndPublishImage([
steps { 'imageName': 'reg.cadoles.com/pcaseiro/myapplication-standalone',
shell('make') // Use current tag or default tag if not defined
} 'imageTag': defaultTag,
} 'dockerfile': './misc/images/myapplication-standalone/Dockerfile',
job('Publishing docker images') { 'dryRun': false
steps { ])
shell('make release') container.buildAndPublishImage([
} 'imageName': 'reg.cadoles.com/pcaseiro/myapplication-kube',
} // Use current tag or default tag if not defined
'imageTag': defaultTag,
'dockerfile': './misc/images/myapplication-kube/Dockerfile',
'dryRun': false
])
} }
} }
] ]