Skip to content

Commit

Permalink
main and tags are stable (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
rustydb authored Jul 26, 2021
1 parent fe628c9 commit b29409d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Jenkinsfile.github
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@Library('csm-shared-library') _

def isStable = env.TAG_NAME != null || env.BRANCH_NAME == 'main' ? true : false
pipeline {
agent {
label "metal-gcp-builder"
Expand All @@ -12,8 +13,8 @@ pipeline {

environment {
IS_STABLE = getBuildIsStable()
BUILD_METADATA = getRpmRevision(isStable: env.IS_STABLE)
GIT_REPO_NAME = sh(returnStdout: true, script: "basename -s .git ${GIT_URL}").trim()
BUILD_METADATA = getRpmRevision(isStable: isStable)
GIT_REPO_NAME = getRepoName()
}

stages {
Expand All @@ -32,8 +33,8 @@ pipeline {
stage('Publish') {
steps {
script {
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/RPMS/noarch/*.rpm", arch: "noarch", isStable: env.IS_STABLE)
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", arch: "src", isStable: env.IS_STABLE)
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/RPMS/noarch/*.rpm", arch: "noarch", isStable: isStable)
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", arch: "src", isStable: isStable)
}
}
}
Expand Down

0 comments on commit b29409d

Please sign in to comment.