Skip to content
Snippets Groups Projects
Commit 7407e902 authored by Shweta Shrivastava's avatar Shweta Shrivastava
Browse files

Changes to update pipeline status on Gitlab MR page

parent 91c66132
No related branches found
No related tags found
1 merge request!2Changes to checkout feature branch
...@@ -55,14 +55,16 @@ pipeline { ...@@ -55,14 +55,16 @@ pipeline {
stage ("print latest commit info") { stage ("print latest commit info") {
steps { steps {
script { script {
echo "Building on: " gitlabCommitStatus(name: "Print latest commit info") {
echo " Repository -- ${GIT_URL}" echo "Building on: "
echo " Branch -- ${GIT_BRANCH}" echo " Repository -- ${GIT_URL}"
echo " Commit -- ${GIT_COMMIT}" echo " Branch -- ${GIT_BRANCH}"
echo "ENV eNB_mergeRequest: ${params.eNB_mergeRequest}" echo " Commit -- ${GIT_COMMIT}"
echo "ENV eNB_Repository: ${params.eNB_Repository}" echo "ENV eNB_mergeRequest: ${params.eNB_mergeRequest}"
echo "ENV source branch: ${params.eNB_Branch}" echo "ENV eNB_Repository: ${params.eNB_Repository}"
echo "ENV target branch: ${params.eNB_TargetBranch}" echo "ENV source branch: ${params.eNB_Branch}"
echo "ENV target branch: ${params.eNB_TargetBranch}"
}
} }
} }
} }
...@@ -70,16 +72,20 @@ pipeline { ...@@ -70,16 +72,20 @@ pipeline {
stage ('Clone Ansible toolchain') { stage ('Clone Ansible toolchain') {
steps { steps {
script { script {
sh "git clone https://gitlab.com/shweta.shrivastava/colosseum-cm.git" gitlabCommitStatus(name: "Clone Ansible scripts") {
sh "git clone https://gitlab.com/shweta.shrivastava/colosseum-cm.git"
}
} }
} }
} }
stage ('Set up Ansible toolchain') { stage ('Configure Ansible toolchain') {
steps { steps {
script { script {
dir ('colosseum-cm') { gitlabCommitStatus(name: "Configure Ansible toolchain") {
sh "git checkout oai-ci" dir ('colosseum-cm') {
sh "./bootstrap.sh ${GIT_URL} ${params.eNB_Branch} ${GIT_COMMIT}" sh "git checkout oai-ci"
sh "./bootstrap.sh ${GIT_URL} ${params.eNB_Branch} ${GIT_COMMIT}"
}
} }
} }
} }
...@@ -87,8 +93,10 @@ pipeline { ...@@ -87,8 +93,10 @@ pipeline {
stage ('Run Ansible toolchain') { stage ('Run Ansible toolchain') {
steps { steps {
script { script {
dir ('colosseum-cm/ansible') { gitlabCommitStatus(name: "Run Ansible toolchain") {
sh "ansible-playbook oai.yml" dir ('colosseum-cm/ansible') {
sh "ansible-playbook oai.yml"
}
} }
} }
} }
......
...@@ -57,18 +57,20 @@ pipeline { ...@@ -57,18 +57,20 @@ pipeline {
stages { stages {
stage ("print latest commit info") { stage ("print latest commit info") {
steps { steps {
script { script {
echo "Building on: " gitlabCommitStatus(name: "Print latest commit info") {
echo " Repository -- ${GIT_URL}" echo "Building on: "
echo " Branch -- ${GIT_BRANCH}" echo " Repository -- ${GIT_URL}"
echo " Commit -- ${GIT_COMMIT}" echo " Branch -- ${GIT_BRANCH}"
//sh 'printenv' echo " Commit -- ${GIT_COMMIT}"
echo "ENV request type: ${env.gitlabMergeRequestIid}" //sh 'printenv'
echo "ENV action type: ${env.gitlabActionType}" echo "ENV request type: ${env.gitlabMergeRequestIid}"
echo "ENV branch: ${env.gitlabBranch}" echo "ENV action type: ${env.gitlabActionType}"
echo "ENV source branch: ${env.gitlabSourceBranch}" echo "ENV branch: ${env.gitlabBranch}"
echo "ENV target branch: ${env.gitlabTargetBranch}" echo "ENV source branch: ${env.gitlabSourceBranch}"
} echo "ENV target branch: ${env.gitlabTargetBranch}"
}
}
} }
} }
// stage ("Verify Parameters") { // stage ("Verify Parameters") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment