Some cleanup
This commit is contained in:
parent
68ba5ecad3
commit
bbd4efbf3d
1 changed files with 6 additions and 5 deletions
|
@ -1,16 +1,13 @@
|
|||
@Library('ocutil') _
|
||||
|
||||
node() {
|
||||
def gitVersionCmd = "mono /usr/local/GitVersion/GitVersion.exe"
|
||||
|
||||
stage("Checkout") {
|
||||
deleteDir()
|
||||
git(url: "https://github.com/omallo/ruby-ex.git", credentialsId: "github-omallo")
|
||||
}
|
||||
|
||||
def gitVersionCmd = "mono /usr/local/GitVersion/GitVersion.exe"
|
||||
def buildVersion = sh(script: "${gitVersionCmd} /showvariable FullSemVer", returnStdout: true).trim()
|
||||
def tagVersion = sh(script: "${gitVersionCmd} /showvariable MajorMinorPatch", returnStdout: true).trim()
|
||||
echo "versions: buildVersion=${buildVersion}, tagVersion=${tagVersion}"
|
||||
|
||||
def config = ocutil.parseConfig(readFile("deployment/config.yaml"))
|
||||
|
||||
stage("Build") {
|
||||
|
@ -29,6 +26,10 @@ node() {
|
|||
|
||||
if (isPromoteToTest) {
|
||||
stage("Deploy to TEST") {
|
||||
def buildVersion = sh(script: "${gitVersionCmd} /showvariable FullSemVer", returnStdout: true).trim()
|
||||
def tagVersion = sh(script: "${gitVersionCmd} /showvariable MajorMinorPatch", returnStdout: true).trim()
|
||||
echo "versions: buildVersion=${buildVersion}, tagVersion=${tagVersion}"
|
||||
|
||||
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'github-omallo', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD']]) {
|
||||
sh "git tag ${tagVersion}"
|
||||
sh "git push --tags https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/omallo/ruby-ex.git"
|
||||
|
|
Loading…
Reference in a new issue