Compare commits

..

2 Commits

Author SHA1 Message Date
Ruakij 92cd1da6f0 Merge branch 'dev' 11 months ago
Ruakij f8854b4fa6 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 $GIT_COMMIT").trim()
def version = sh (returnStdout: true, script: "git describe --tags --long --always $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){
if(version != gitCommit){
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){
if(version != gitCommit){
def parts = version.split('.')
if(parts.size() > 0){
for (int i = 0; i < parts.size(); i++) {

Loading…
Cancel
Save