Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!groovy
- try {
- node('mac') {
- ansiColor('xterm') {
- stage 'Clean workspace'
- deleteDir()
- stage 'Checkout'
- checkout scm
- stage 'Build'
- withCredentials(
- [
- [$class: 'UsernamePasswordMultiBinding', credentialsId: 'npm', usernameVariable: 'NPM_USERNAME', passwordVariable: 'NPM_PASSWORD'],
- [$class: 'StringBinding', credentialsId: 'npmEmail', variable: 'NPM_EMAIL'],
- [$class: 'StringBinding', credentialsId: 'npmRegistry', variable: 'NPM_REGISTRY']
- ]) {
- sh "printenv"
- sh "npm set registry ${NPM_REGISTRY}"
- sh "npm-cli-login -u ${NPM_USERNAME} -p ${NPM_PASSWORD} -e ${NPM_EMAIL} -r ${NPM_REGISTRY}"
- sh "npm i"
- sh "security -v unlock-keychain -p ... $HOME/Library/Keychains/login.keychain"
- sh "grunt build --sign --beta"
- }
- }
- }
- } catch(err) {
- echo "Caught: ${err}"
- // Send an email... or something.
- throw err;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement