Last active
February 11, 2019 05:58
-
-
Save vishal-biyani/7104c92ac9aeab69d2b78cb22fe36cc7 to your computer and use it in GitHub Desktop.
Jenkinsfile-Monorepo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages { | |
stage('configure webook') { | |
steps { | |
script { | |
setupWebhook() | |
} | |
} | |
} | |
stage('Create kubeconfig') { | |
steps { | |
container('deploy') { | |
createKubeconfig() | |
} | |
} | |
} | |
stage('Checkout scm') { | |
steps { | |
checkout scm | |
} | |
} | |
stage('Find app name to deploy') { | |
steps { | |
script { | |
if (REF != "") { | |
env.APP = VALUESFILE.split('/')[0] | |
} | |
} | |
echo "application to deploy:${APP}" | |
} | |
} | |
stage('Get helm-charts') { | |
steps { | |
getHelmCharts() | |
} | |
} | |
stage('Deploy helm chart') { | |
steps { | |
container('deploy') { | |
script { | |
INSTALL = sh ( | |
script: "helm status ${APP}", | |
returnStatus: true | |
) | |
} | |
echo "To install? ${INSTALL}" | |
helmInstall(INSTALL) | |
} | |
} | |
} | |
} | |
post { | |
cleanup { | |
deleteDir() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment