Skip to content

Instantly share code, notes, and snippets.

@vishal-biyani
Last active February 11, 2019 05:58
Show Gist options
  • Save vishal-biyani/7104c92ac9aeab69d2b78cb22fe36cc7 to your computer and use it in GitHub Desktop.
Save vishal-biyani/7104c92ac9aeab69d2b78cb22fe36cc7 to your computer and use it in GitHub Desktop.
Jenkinsfile-Monorepo
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