Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable new multibranch pipeline with a Jenkinsfile
- Loading branch information
1 parent
ab2d5e4
commit 82b2a91
Showing
28 changed files
with
1,863 additions
and
967 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tag-version-prefix = "" | ||
message = "Upgrade to %s" | ||
preid = "beta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
pipeline { | ||
agent { label 'cc-ci-agent' } | ||
environment { | ||
GIT_TAG_NAME = gitTagName() | ||
S3_KEY_ID = credentials('CELLAR_CC_TOOLS_ACCESS_KEY_ID') | ||
S3_SECRET_KEY = credentials('CELLAR_CC_TOOLS_SECRET_ACCESS_KEY') | ||
BINTRAY_API_KEY = credentials('BINTRAY_CC_TOOLS_API_KEY') | ||
NPM_TOKEN = credentials('NPM_TOKEN') | ||
} | ||
stages { | ||
stage('build') { | ||
steps { | ||
sh 'npm install' | ||
sh 'node scripts/job-build.js' | ||
} | ||
} | ||
stage('package') { | ||
steps { | ||
sh 'node scripts/job-package.js' | ||
} | ||
} | ||
stage('publish') { | ||
when { | ||
not { | ||
environment name: 'GIT_TAG_NAME', value: '' | ||
} | ||
beforeAgent true | ||
} | ||
parallel { | ||
stage('cellar') { | ||
steps { | ||
sh 'node scripts/job-publish-cellar.js' | ||
} | ||
} | ||
stage('bintray') { | ||
steps { | ||
sh 'node scripts/job-publish-bintray.js' | ||
} | ||
} | ||
stage('arch') { | ||
steps { | ||
script { | ||
sshagent (credentials: ['CI_CLEVER_CLOUD_SSH_KEY']) { | ||
sh 'node ./scripts/job-publish-arch.js' | ||
} | ||
} | ||
} | ||
} | ||
stage('brew') { | ||
steps { | ||
script { | ||
sshagent (credentials: ['CI_CLEVER_CLOUD_SSH_KEY']) { | ||
sh 'node ./scripts/job-publish-brew.js' | ||
} | ||
} | ||
} | ||
} | ||
stage('npm') { | ||
steps { | ||
sh 'node ./scripts/job-publish-npm.js' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
archiveArtifacts artifacts: 'releases/**/*', fingerprint: true | ||
} | ||
} | ||
} | ||
|
||
@NonCPS | ||
String gitTagName() { | ||
return sh(script: 'git describe --tags --exact-match $(git rev-parse HEAD) || true', returnStdout: true)?.trim() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.