Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
fix: move up build step + remove double provisioning step (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
zot24 authored and ynnoj committed Jul 19, 2017
1 parent 533bd50 commit 58b1132
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
23 changes: 8 additions & 15 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ try {
}
}

stage ("Run tests") {
stage ("Building") {
docker.image('node:alpine').inside {
sh "npm run rollup"
}
}

stage ("Testing") {
docker.image('node:alpine').inside {
sh "npm run-script test"
}
Expand All @@ -30,18 +36,6 @@ try {
}
}

stage ("Prune + Provisioning") {
docker.image('node:alpine').inside {
sh "npm prune"
}
}

stage ("Provisioning") {
docker.image('node:alpine').inside {
sh "npm install"
}
}

stage ("Configure npm") {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'npm-moltin-moltinbot-password', usernameVariable: 'NPM_USERNAME', passwordVariable: 'NPM_PASSWORD']]) {
sh "docker run -e NPM_USER=$NPM_USERNAME -e NPM_PASS=\"$NPM_PASSWORD\" -e NPM_EMAIL=$NPM_EMAIL bravissimolabs/generate-npm-authtoken > .npmrc.tmp"
Expand All @@ -53,7 +47,7 @@ try {
}
}

try {
try {
stage ("Versioning") {
withCredentials([[$class: 'StringBinding', credentialsId: 'github-moltin-moltinbot-token', variable: 'GH_TOKEN']]) {
sshagent (credentials: ['github-moltin-moltinbot-ssh-key']) {
Expand All @@ -66,7 +60,6 @@ try {

docker.image('node:alpine').inside {
sh "mv .npmrc.tmp .npmrc"
sh "npm run rollup"
sh "npm publish"
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"commit": "git-cz",
"rollup": "rollup -c",
"test": "npm run rollup && mocha test/unit/*"
"test": "mocha test/unit/*"
},
"main": "dist/moltin.cjs.js",
"module": "src/moltin.js",
Expand Down

0 comments on commit 58b1132

Please sign in to comment.