Questions tagged [jenkins-pipeline-unit]

Jenkins Pipeline unit testing framework

Jenkins Pipeline unit testing framework

https://github.com/jenkinsci/JenkinsPipelineUnit

20 questions
0
votes
2 answers

EOF: command not found in Jenkins Pipeline

I'm trying to launch Datadog agent in Jenkins pipeline, but I'm getting below errors: line 7: warning: here-document at line 2 delimited by end-of-file (wanted `EOF'). EOF: Command not found Error. stage('Install Datadog agent'){ when { …
Deepakvg
  • 71
  • 2
  • 9
0
votes
1 answer

Gradle does not run unit tests in groovy

I am trying to run a unit test in groovy. The test class itself never gets called. My build.gradle is below: apply plugin: 'groovy' sourceCompatibility = 1.8 repositories { mavenCentral() maven { url 'https://repo.jenkins-ci.org/releases/'…
NewShe
  • 3
  • 1
  • 3
0
votes
1 answer

Cannot get property 'values' on null object in JenkinsPipelineUnit

I have below module call xrayExportJiraFeature.groovy in my JenkinsSharedLib and call that module in my javaPipeline def call(xrayJiraIssue) { def jiraInstanceID = "" echo 'curl -k -L -X GET…
Shabar
  • 2,617
  • 11
  • 57
  • 98
0
votes
1 answer

JenkinsPipelineUnit helper can intercept text param call but not string param call

How can I get JenkinsPipelineUnit to intercept both text() and string() param calls? I have code that triggers a build with a few params. I want to write a nice unit test to check that it does what it should. However, the string() calls are not…
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135
0
votes
2 answers

To run aws ECR scan commands in jenkinsfile

Trying to run below 2 commands in Jenkins file NOTE: below commands are working fine locally where Jenkins is installed sh ''' aws ecr start-image-scan --registry-id 123 \ --repository-name test1 \ --image-id…
1
2