Unverified Commit f689b293 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #789 from hypothesis/fix-missing-block-warning

Wrap "stage" contents in a block in Jenkinsfile
parents d0bb1615 8d46c138
......@@ -10,37 +10,40 @@ node {
returnStdout: true
).trim()
stage 'Build'
nodeEnv.inside("-e HOME=${workspace}") {
sh "echo Building Hypothesis client \"${pkgVersion}\""
sh 'make clean'
sh 'make'
stage('Build') {
nodeEnv.inside("-e HOME=${workspace}") {
sh "echo Building Hypothesis client \"${pkgVersion}\""
sh 'make clean'
sh 'make'
}
}
stage 'Test'
nodeEnv.inside("-e HOME=${workspace}") {
sh 'make test'
stage('Test') {
nodeEnv.inside("-e HOME=${workspace}") {
sh 'make test'
}
}
if (isTag()) {
stage 'Publish'
nodeEnv.inside("-e HOME=${workspace}") {
withCredentials([
[$class: 'StringBinding', credentialsId: 'npm-token', variable: 'NPM_TOKEN']]) {
// Use `npm` rather than `yarn` for publishing.
// See https://github.com/yarnpkg/yarn/pull/3391.
sh "echo '//registry.npmjs.org/:_authToken=${env.NPM_TOKEN}' >> \$HOME/.npmrc"
sh "npm publish"
stage('Publish') {
nodeEnv.inside("-e HOME=${workspace}") {
withCredentials([
[$class: 'StringBinding', credentialsId: 'npm-token', variable: 'NPM_TOKEN']]) {
// Use `npm` rather than `yarn` for publishing.
// See https://github.com/yarnpkg/yarn/pull/3391.
sh "echo '//registry.npmjs.org/:_authToken=${env.NPM_TOKEN}' >> \$HOME/.npmrc"
sh "npm publish"
}
}
}
// Upload the contents of the package to an S3 bucket, which it
// will then be served from.
docker.image('nickstenning/s3-npm-publish')
.withRun('', "hypothesis@${pkgVersion} s3://cdn.hypothes.is") { c ->
sh "docker logs --follow ${c.id}"
}
// Upload the contents of the package to an S3 bucket, which it
// will then be served from.
docker.image('nickstenning/s3-npm-publish')
.withRun('', "hypothesis@${pkgVersion} s3://cdn.hypothes.is") { c ->
sh "docker logs --follow ${c.id}"
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment