Commit 4d7b1935 authored by Asad ullah khan's avatar Asad ullah khan

add pieplie code

parent 40e7fd19
updateGitlabCommitStatus name: 'Jenkins', state: 'pending'
pipeline {
environment {
imageRepo = "asadullahkhan/poc-backend"
......@@ -9,6 +10,7 @@ pipeline {
stage('Cloning Git') {
steps {
git([url: 'https://github.com/AsadUkh/app-code-backend.git', branch: 'master'])
updateGitlabCommitStatus name: "Jenkins", state: "running"
}
}
stage('Build application') {
......@@ -31,12 +33,29 @@ pipeline {
}
}
}
// stage('Remove Unused docker image') {
// steps{
// sh "docker rmi $imagename:$BUILD_NUMBER"
// sh "docker rmi $imagename:latest"
// }
// }
}
post {
always {
script {
try {
echo "Helloworl integration with gitla"
}
catch(Exception ex) {
echo "Unable to get pod name, may be no pods were created. Check previous steps for more logs. This is NOT a build error."
}
// archiveArtifacts artifacts: 'application.log'
}
}
success {
updateGitlabCommitStatus name: "Jenkins", state: "success"
}
failure {
updateGitlabCommitStatus name: "Jenkins", state: "failed"
}
unstable {
updateGitlabCommitStatus name: "Jenkins", state: "failed"
}
}
}
\ No newline at end of file
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