...
 
Commits (3)
...@@ -43,6 +43,25 @@ pipeline { ...@@ -43,6 +43,25 @@ pipeline {
echo "Git URL is ${GIT_URL}" echo "Git URL is ${GIT_URL}"
echo "GitLab Act is ${env.gitlabActionType}" echo "GitLab Act is ${env.gitlabActionType}"
script { script {
def causes = currentBuild.getBuildCauses()
echo "causes count: " + causes.size().toString()
echo "causes text : " + causes.toString()
for (cause in causes) {
echo "cause is " + cause.toString()
if (cause instanceof hudson.triggers.SCMTrigger.SCMTriggerCause) {
echo "RD: triggered by SCM"
echo 'the cause is ' + cause.getShortDescription()
}
if (cause instanceof com.dabsquared.gitlabjenkins.cause.GitLabWebHookCause) {
echo "RD: triggered by GitLab webhook"
echo 'the cause is ' + cause.getShortDescription()
}
if (cause instanceof hudson.model.Cause.UpstreamCause) {
echo "RD: triggered by upstream job"
echo 'the cause is ' + cause.getShortDescription()
}
}
for (int i = 0; i < NB_STAGES; i++) { for (int i = 0; i < NB_STAGES; i++) {
pipelineStateStatusArray[i] = false pipelineStateStatusArray[i] = false
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
pipeline { pipeline {
agent { agent {
label 'orion' label 'caracal'
} }
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
...@@ -12,6 +12,21 @@ pipeline { ...@@ -12,6 +12,21 @@ pipeline {
stage ("Verify") { stage ("Verify") {
steps { steps {
script { script {
def causes = currentBuild.getBuildCauses()
echo "causes count: " + causes.size().toString()
echo "causes text : " + causes.toString()
for (cause in causes) {
echo "cause is " + cause.toString()
if (cause instanceof hudson.triggers.SCMTrigger.SCMTriggerCause) {
echo "RD: triggered by SCM"
echo 'the cause is ' + cause.getShortDescription()
}
if (cause instanceof hudson.model.Cause.UpstreamCause) {
echo "RD: triggered by upstream job"
echo 'the cause is ' + cause.getShortDescription()
}
}
def allParametersPresent = true def allParametersPresent = true
echo params.eNB_IPaddress echo params.eNB_IPaddress
if (params.eNB_Repository == null) { if (params.eNB_Repository == null) {
......