Compare commits

..

2 Commits

Author SHA1 Message Date
Ruakij 78f2d896b6 Merge branch 'dev' 11 months ago
Ruakij 1d4b59b7cc Add Jenkinsfile 11 months ago

6
Jenkinsfile vendored

@ -48,7 +48,7 @@ spec:
userRemoteConfigs: scm.userRemoteConfigs
])
def version = sh (returnStdout: true, script: "git describe --tags --long --always $GIT_COMMIT").trim()
def version = sh (returnStdout: true, script: "git describe --tags --long $GIT_COMMIT").trim()
def gitCommit = sh (returnStdout: true, script: "git rev-parse --short $GIT_COMMIT").trim()
echo "Version: $version"
echo "Git Commit: $gitCommit"
@ -58,7 +58,7 @@ spec:
if (GIT_BRANCH == "main") {
IMAGE_TAG += "--destination $IMAGE_PUSH_DESTINATION:latest "
if(version != gitCommit){
if(version){
def parts = version.split('.')
if(parts.size() > 0){
for (int i = 0; i < parts.size(); i++) {
@ -70,7 +70,7 @@ spec:
} else {
IMAGE_TAG += "--destination $IMAGE_PUSH_DESTINATION:$GIT_BRANCH "
if(version != gitCommit){
if(version){
def parts = version.split('.')
if(parts.size() > 0){
for (int i = 0; i < parts.size(); i++) {

Loading…
Cancel
Save