Repository URL to install this package:
|
Version:
1.5.2-rc.1 ▾
|
@doodle/intercom-connector
/
Jenkinsfile
|
|---|
def GITHUB_REPO = "https://github.com/DoodleScheduling/intercom-connector.git"
node('jenkins') {
stage('setup') {
checkout scm
script {
PACKAGE = readJSON file: 'package.json'
VERSION = "${PACKAGE.version}"
TAG = 'latest'
if (env.BRANCH_NAME != 'master') {
VERSION = "${VERSION}-dev.${env.BUILD_NUMBER}"
}
}
}
stage('install') {
sh "yarn install"
}
stage('lint') {
sh "yarn lint"
}
if (env.BRANCH_NAME == 'master')
stage('publish') {
withCredentials([string(credentialsId: 'ONESKY_SECRET_KEY', variable: 'ONESKY_SECRET_KEY')]) {
sh """
echo "publishing version ${VERSION} to registry..."
echo "//npm-proxy.fury.io/mfsTqYdDz3bsKFQJuMAR/tmf/:_authToken=gzE3v6EJzrJ4ptsqoadm" > ~/.npmrc
echo "ONESKY_PUBLIC_KEY=a1wBmLzC1dlH3dpG8i72a0grw8rTN8PN" >> .env
echo "ONESKY_SECRET_KEY=$ONESKY_SECRET_KEY" >> .env
yarn gulp publish && \
echo "🚀"
"""
}
}
}