Skip to content

Commit

Permalink
added check for snapshot in develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Fragola committed Sep 14, 2021
1 parent 8cb0f55 commit 0a764e8
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions vars/e4tDeployDockerImageIfNeeded.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,16 @@ def call(String repoName, String localTag, String remoteHost) {
fi ;\\
;; \\
develop) \\
localTag=$localTag ;\\
version=\${localTag%-SNAPSHOT*} ;\\
commitId=\${localTag#*SNAPSHOT-} ;\\
shortCommitId=\${commitId:0:6} ;\\
timeStamp=\$(date '+%Y%m%d%H%M%S') ;\\
remoteTag="develop-\$version-SNAPSHOT-\$shortCommitId-\$timeStamp" ;\\
if [[ $localTag != *SNAPSHOT* ]]; then \\
echo "wrong develop tag detected, skipping (version=$localTag)" ;\\
else \\
localTag=$localTag ;\\
version=\${localTag%-SNAPSHOT*} ;\\
commitId=\${localTag#*SNAPSHOT-} ;\\
shortCommitId=\${commitId:0:6} ;\\
timeStamp=\$(date '+%Y%m%d%H%M%S') ;\\
remoteTag="develop-\$version-SNAPSHOT-\$shortCommitId-\$timeStamp" ;\\
fi ;\\
;; \\
feature/*) \\
if [[ $localTag == *-EXP-SNAPSHOT* ]]; then \\
Expand Down

0 comments on commit 0a764e8

Please sign in to comment.