Archived
0
0
Fork 0

ci: added ci skipping [ci skip]

This commit is contained in:
Daryl Ronningen 2021-07-16 20:35:50 -07:00
parent dfe63a90fe
commit 37f9763d72
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B

16
Jenkinsfile vendored
View file

@ -17,6 +17,18 @@ pipeline {
} }
stages { stages {
stage('Checkout') {
steps {
script {
echo '==========Checking out=========='
if (sh (script: "git log -1 | grep '.*\\[ci skip\\].*'", returnStatus: true)) {
error "'[ci skip]' found in git commit message. Aborting."
currentBuild.result = 'NOT_BUILT'
}
}
}
}
stage('Dependencies') { stage('Dependencies') {
steps { steps {
echo '==========Installing Dependencies==========' echo '==========Installing Dependencies=========='
@ -35,12 +47,12 @@ pipeline {
steps { steps {
script { script {
echo '==========Publishing to NPM==========' echo '==========Publishing to NPM=========='
if(env.BRANCH_NAME == 'master') { if (env.BRANCH_NAME == 'master') {
echo '==========Publishing as Development Version==========' echo '==========Publishing as Development Version=========='
sh 'echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc' sh 'echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc'
sh 'yarn version $(node -pe \'require("./package.json").version\')-$(git rev-parse HEAD).$(date +%s)' sh 'yarn version $(node -pe \'require("./package.json").version\')-$(git rev-parse HEAD).$(date +%s)'
sh 'npm publish --tag dev --access public' sh 'npm publish --tag dev --access public'
} else if(env.BRANCH_NAME == 'stable') { } else if (env.BRANCH_NAME == 'stable') {
echo '==========Publishing as Stable Version==========' echo '==========Publishing as Stable Version=========='
sh 'semantic-release' sh 'semantic-release'
} }