Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [jenkins-groovy]

Question regarding using groovy code in Jenkins, specifically in Jenkinsfile and groovy plugins

jenkins-groovy
0 votes
0 answers
16 views

Use credentials in jenkins properties

I am trying to create a custom list with every branch/tag from a specific SVN repository in jenkins. I am using a groovy script in order to create the required list as the List Subversion tags (and ...
Pantelisy's user avatar
0 votes
0 answers
23 views

Unable to use imports from a different folder/Poetry environment on Jenkins

Issue with Poetry and Jenkins: Unable to Use Imports from a different folder/Poetry environment Hi everyone, I'm encountering an issue with my current setup involving Poetry and Jenkins. I'm trying to ...
TNX's user avatar
  • 1
0 votes
1 answer
25 views

Getting "ErrorAction$ErrorId: edf4f356-929c-4720-a57f-b2bdef027f2c" error from Jenkins when trying to extract information from a child job

I have a use case where I want to extract information from a Child job in the parent job. This is my pipeline script: pipeline { agent any stages { stage('Validate Other Job') { ...
QualityMatters's user avatar
0 votes
1 answer
35 views

Map variable becomes null when manipulated as part of a Jenkins pipeline

I'm building a Jenkins pipeline, and I have this method: private Map processServerMapping(Map serverMapping, List newVersions) { def currentVersions = serverMapping.values().toSet() def ...
Anton Asserzon's user avatar
0 votes
1 answer
27 views

Using a shared library in a declarative Jenkins pipeline

I have a declarative pipeline that I want to use classes from a a shared library in. I have declared a libraries block as follows: libraries { lib('app-engine-jenkins-lib') } … but I do not know ...
Martin Smithson's user avatar
3 votes
1 answer
100 views

sh commands seem to hang when running in parallel stages

We have a primary build pipeline that uses workflow-cps parallel step to run around ~50 containers at the same time, and it’s heavily sh dependent. As more agents are added to the parallel step, sh ...
SimpleNiko's user avatar
0 votes
0 answers
32 views

Jenkins pipeline: need to get string parameter scriptpath from 'Pipeline with SCM' UI settings

Need to get string parameter 'scriptpath' (path to exact groovy file) from 'Pipeline with SCM' UI settings - from the inside of pipe during its processing. Without using: currentBuild.rawBuild.* ...
Evgeniy Vovney's user avatar
0 votes
0 answers
30 views

How to load jenkins parameters from a file?

We have over 100 Jenkinsfile which have the same Landscape parameter in the parameter definition of the Jenkinsfile pipeline { agent any options { timeout(time: 2, unit: 'HOURS') ...
Numb007's user avatar
0 votes
2 answers
54 views

My variable is not interpolated in the body on emailext

This is a piece of my Jenkinsfile: emailext([ attachmentsPattern: '**/build/*.log', subject: 'Hello World', recipientProviders: [developers(), requestor()], to: '$...
tail's user avatar
  • 375
-2 votes
0 answers
30 views

Jenkinsfile DSL - archiveArtifacts syntax

I have seen the following archiveArtifacts syntax: archiveArtifacts '**' Could you please explain how does it work ?
Irbis's user avatar
  • 1,397
0 votes
1 answer
20 views

can't access an env var added in groovy script

Team, I want to capture a var remoteUrl value coming from jenkinsfile into groovy library that is passed from jenkinsfile and store it in env var to access later. but I can't seem to do it. any hint ...
AhmFM's user avatar
  • 1,744
0 votes
1 answer
37 views

Find git commit hash for a previous run in Jenkins pipeline

I have a job in Jenkins which is designed to build multiple Docker container images along with charts. I want this job to check git tree for differences to know if new version of an image should be ...
kab00m's user avatar
  • 133
0 votes
1 answer
36 views

unable to run a function from imported groovy library getting "No such property: git for class: groovy.lang.Binding"

Team, I am learning groovy and created a simple one but getting this error running pipeline on jenkins. not sure what it really means + echo inside MAIN in stage Formatting inside MAIN in stage ...
AhmFM's user avatar
  • 1,744
0 votes
1 answer
29 views

MultipleCompilationErrorsException in groovy while executing kubectl to find java process id from a pod

This is my line from declarative pipeline in groovy to fetch java process ID from a k8s pod: def jpsid = "${kubectl exec -i "${pod}" -n *<some_namespace>* -- jps | awk '{ print &...
antriksh mathur's user avatar
1 vote
1 answer
22 views

Jenkinsfile Interpolation Syntax Issue

I have the following Step in my Declarative Jenkinsfile: stage('Download Lambda Artifacts') { steps { script { withCredentials([usernamePassword(credentialsId: ...
Josh's user avatar
  • 33

15 30 50 per page
1
2 3 4 5
200