...
 
Commits (3)
......@@ -43,6 +43,25 @@ pipeline {
echo "Git URL is ${GIT_URL}"
echo "GitLab Act is ${env.gitlabActionType}"
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++) {
pipelineStateStatusArray[i] = false
}
......
......@@ -2,7 +2,7 @@
pipeline {
agent {
label 'orion'
label 'caracal'
}
options {
disableConcurrentBuilds()
......@@ -12,6 +12,21 @@ pipeline {
stage ("Verify") {
steps {
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
echo params.eNB_IPaddress
if (params.eNB_Repository == null) {
......