Commit f628a240 authored by Mame Bineta Diakite's avatar Mame Bineta Diakite

Update Jenkinsfile

parent db3a2592
...@@ -38,65 +38,5 @@ pipeline { ...@@ -38,65 +38,5 @@ pipeline {
} }
} }
stage('Deploy with Helm') {
steps {
script {
sh """
helm upgrade --install ${HELM_RELEASE} ./charthelm-odoo \
--set image.repository=${DOCKER_REGISTRY}/${IMAGE_NAME} \
--set image.tag=${env.BUILD_NUMBER} \
--kube-context ${KUBE_CONTEXT}
"""
}
}
}
stage('Sync with ArgoCD') {
steps {
script {
sh """
argocd app sync ${HELM_RELEASE} --kube-context ${KUBE_CONTEXT}
"""
}
}
}
stage('Send Notification to Google Chat') {
steps {
script {
def message = """
{
"text": "Pipeline completed successfully for build #${env.BUILD_NUMBER} of ${IMAGE_NAME}."
}
"""
sh """
curl -X POST -H "Content-Type: application/json" \
-d '${message}' \
"${GOOGLE_CHAT_WEBHOOK}"
"""
}
}
}
}
post {
always {
cleanWs()
}
failure {
script {
def message = """
{
"text": "Pipeline failed for build #${env.BUILD_NUMBER} of ${IMAGE_NAME}. Please check the logs."
}
"""
sh """
curl -X POST -H "Content-Type: application/json" \
-d '${message}' \
"${GOOGLE_CHAT_WEBHOOK}"
"""
}
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment