Skip to content

Commit

Permalink
Merge pull request #62 from auth0/jenkins
Browse files Browse the repository at this point in the history
Updates .travis.yml to run tests on every PR and introduces Jenkins
  • Loading branch information
esarafianou committed Jan 24, 2020
2 parents ee88388 + 9d781da commit 4625cc3
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ node_js:
- 8
- 10
- 12
install:
- npm install
script:
- npm run test
notifications:
email: false
44 changes: 44 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pipeline {
agent {
label 'prodsec'
}

tools {
nodejs '8.16.0'
}

environment {
NPM_TOKEN = credentials('auth0npm-npm-token')
}

options {
timeout(time: 10, unit: 'MINUTES')
}

stages {
stage('Build') {
steps {
sh 'npm install'
}
}

stage('Test') {
steps {
sh 'npm run test'
}
}

stage('Deploy') {
steps {
sh "echo //registry.npmjs.org/:_authToken=${env.NPM_TOKEN} > .npmrc"
sh "npm publish"
}
}
}

post {
always{
deleteDir()
}
}
}

0 comments on commit 4625cc3

Please sign in to comment.