fup-try-010

This commit is contained in:
Philippe Caseiro 2023-06-19 16:09:06 +02:00
parent 13ac2b6959
commit 3a9dc1ae21
2 changed files with 15 additions and 19 deletions

24
Jenkinsfile vendored
View File

@ -13,20 +13,16 @@ symfonyAppPipeline('ubuntu:22.04', [
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()
container.buildAndPublishImage([ job('Building docker images') {
'imageName': 'reg.cadoles.com/pcaseiro/myapplication-standalone', steps {
// Use current tag or default tag if not defined shell('make')
'imageTag': defaultTag, }
'dockerfile': './misc/images/myapplication-standalone/Dockerfile', }
'dryRun': false job('Publishing docker images') {
]) steps {
container.buildAndPublishImage([ shell('make release')
'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
])
} }
} }
] ]

View File

@ -2,11 +2,11 @@
# Makefile for Cadoles SP # Makefile for Cadoles SP
################################ ################################
IMAGE_REPO ?= reg.cadoles.com/cadoles
IMAGE_VERSION ?= 0.0.1
DAY_SUFFIX_TAG ?= $(shell date +%Y%m%d)
COMMIT_ID ?= $(shell git rev-parse --short --verify HEAD) COMMIT_ID ?= $(shell git rev-parse --short --verify HEAD)
CURRENT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD | tr -c '[:alnum:]\n\r' '_'| tr '[:upper:]' '[:lower:]')
IMAGE_REPO ?= reg.cadoles.com/cadoles
IMAGE_VERSION ?= 0.0.1-$(CURRENT_BRANCH)
include main.mk include main.mk