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 {
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') {
steps {
echo '==========Installing Dependencies=========='
@ -35,12 +47,12 @@ pipeline {
steps {
script {
echo '==========Publishing to NPM=========='
if(env.BRANCH_NAME == 'master') {
if (env.BRANCH_NAME == 'master') {
echo '==========Publishing as Development Version=========='
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 'npm publish --tag dev --access public'
} else if(env.BRANCH_NAME == 'stable') {
} else if (env.BRANCH_NAME == 'stable') {
echo '==========Publishing as Stable Version=========='
sh 'semantic-release'
}