currentBuild.rawBuild.getCause(hudson.model.Cause$UpstreamCause).getShortDescription()
but need to get the value from a level higher
def projectProps = [
parameters ([
choice(description: 'Terraform action, plan or apply', name: 'TFACTION',
choices: ['plan','apply'].join('\n')),
choice(description: 'It defines whether or not to have multi availability zone elasticSearch resource deployment, e.g: \'enable\' (for enable multiAZ) or \'disable\' (for disable multiAZ)', name: 'MULTIAZ',
choices: ['enable','disable'].join('\n')),
string(description: 'It defines the elasticSearch name , e.g: apm, telemetry, entitlements, etc.', name: 'NAME')
]),
disableConcurrentBuilds(),
[$class: 'ChoiceParameter', choiceType: 'PT_RADIO', description: 'test_ac',
filterLength: 1, filterable: false, name: 'test_ac',
randomName: 'choice-parameter-1683871426502398',
referencedParameters: 'MULTIAZ',
script: [$class: 'GroovyScript', fallbackScript: [classpath: [], sandbox: false,
script: '''\n
if (MULTIAZ.equals('disable')){
return['2','3','4','6','8','9']
}
''']]
],
[$class: 'BuildDiscarderProperty', strategy: [ $class: 'LogRotator', numToKeepStr: '20']]
]
[$class: 'org.biouno.unochoice.ChoiceParameter', name: 'MULTIAZ', choiceType: 'PT_RADIO', description: 'MULTIAZ',
filterLength: 1, filterable: false,
randomName: 'choice-parameter-47910233643731',
script: [$class: 'org.biouno.unochoice.model.GroovyScript',
script: [$class:'SecureGroovyScript',
script:'''return ["MULTIAZ:selected", "disable", "beta", "enable"]'''
]
]
],
[$class: 'org.biouno.unochoice.CascadeChoiceParameter', name: 'instanceCount ', choiceType: 'PT_RADIO', description: 'instanceCount',
filterLength: 1, filterable: false,
randomName: 'choice-parameter-51976913619136',
referencedParameters: 'MULTIAZ',
script: [$class: 'org.biouno.unochoice.model.GroovyScript',
script: [$class:'SecureGroovyScript',
script:'''if ("MULTIAZ".equals('disable')) { return ["2","3", "4", "6", "8"] }'''
],
]
]
java.lang.ClassCastException: org.biouno.unochoice.ChoiceParameter cannot be cast to hudson.model.JobProperty
Hi Al,
Recently, my CI gets failed. when downloading nuget.exe from NuGet feed link. Is this a known issue?
15:10:36 Preparing to run build script...
15:10:36 -Message Trying to find nuget.exe in PATH...
15:10:36 -Message Downloading NuGet.exe...
15:10:37 Could not download NuGet.exe.
15:10:37 At E:\workspace\Trac\DTra\build\build.ps1:148 char:9
15:10:37 + Throw "Could not download NuGet.exe."
15:10:37 + ~~~~~~~~~
15:10:37 + CategoryInfo : OperationStopped: (Could not download NuGet.exe.:String) [], RuntimeException
15:10:37 + FullyQualifiedErrorId : Could not download NuGet.exe.
...
stage('4.Trigger checks APPS...') {
steps {
script {
echo "Triggering job for APPS"
build job: "check-apps", wait: false
}
}
}
...
phpunit:
[exec] PHPUnit 8.4.3 by Sebastian Bergmann and contributors.
[exec]
...
[exec] OK, but incomplete, skipped, or risky tests!
[exec] Tests: 5437, Assertions: 30371, Skipped: 28.
BUILD SUCCESSFUL
Total time: 9 minutes 44 seconds
Recording test results
INFO: Starting to record.
INFO: Processing JUnit
INFO: [JUnit] - 1 test report file(s) were found with the pattern 'build/logs/junit.xml' relative to '/var/lib/jenkins/jobs/project/workspace' for the testing framework 'JUnit'.
WARNING: The file '/var/lib/jenkins/jobs/project/workspace/build/logs/junit.xml' is an invalid file.
WARNING: At line 3 of file:/var/lib/jenkins/jobs/project/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'assertions' is not allowed to appear in element 'testsuite'.
More of this....
WARNING: At line 7650 of file:/var/lib/jenkins/jobs/project/workspace/build/logs/junit.xml:cvc-attribute.3: The value '0.096055' of attribute 'time' on element 'testsuite' is not valid with respect to its type, 'SUREFIRE_TIME'.
WARNING: At line 7651 of file:/var/lib/jenkins/jobs/project/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'class' is not allowed to appear in element 'testcase'.
WARNING: At line 7651 of file:/var/lib/jenkins/jobs/project/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'file' is not allowed to appear in element 'testcase'.
WARNING: At line 7651 of file:/var/lib/jenkins/jobs/project/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'line' is not allowed to appear in element 'testcase'.
WARNING: At line 7651 of file:/var/lib/jenkins/jobs/project/workspace/build/logs/junit.xml:cvc-complex-type.3.2.2: Attribute 'assertions' is not allowed to appear in element 'testcase'.
WARNING: The result file '/var/lib/jenkins/jobs/project/workspace/build/logs/junit.xml' for the metric 'JUnit' is not valid. The result file has been skipped.
INFO: Skipping tests recording.
Ah... i just found the solution. If anyone is interested:
does anyone with a Bitbucket Branch Source using a team folder know of a way to add a multibranch pipeline build for a repo without doing a Organization Folder Scan?
we have a lot of repos and branches and it takes many many hours to scan (last time it died after 7 hours and it only had gotten to the letter ... c!)