2,963 questions
0
votes
0
answers
79
views
How to create an atomic unabortable step in jenkins
I have a Jenkins pipeline with a critical stage that runs my custom .NET CLI performing important tasks. I want this stage to be fully atomic, meaning that if someone tries to abort the build while ...
0
votes
0
answers
21
views
Jenkins Groovy list user login with Groovy script
I am Rajeswari
In the groovy script i have to filter who login in Jenkins but
I am able to filter the user list all in the manage/security Realm the user list So
How to use it
they is no direct method ...
0
votes
1
answer
60
views
How to reuse method in loaded script from main script in Jenkins without using libraries
I have a main Groovy file with defined methods, and I've loaded a second Groovy script.
main-script.groovy
node('Node1'){
Method1()
Method2()
def loadedSecondScript = load('./second-...
0
votes
1
answer
44
views
How to reuse a loaded script in another loaded script in Jenkins without using libraries
I have a main job script,
pipline.groovy
node('Node1'){
def script1 = load('script1.groovy')
script1()
//..some code
def script2 = load('script2.groovy')
}
I load two scripts in it,
script1....
0
votes
0
answers
94
views
jenkins groovy update kind="secrets text" credentials store in jenkins
Trying to find out what is wrong. thinking I am missing something. context - want to update the secret in the secrets-text credential store by providing only "Credential ID".
I confirm that ...
0
votes
1
answer
484
views
How to use globules correctly in a `Jenkinsfile`?
My original Jenkinsfile was something along the lines of:
DATA = [ ... ]
def Helper(def ver) {
def cfg = DATA[ver]
...
}
...
But this gets warnings in the logs to the effect of:
Did you ...
0
votes
0
answers
78
views
how to retrieve secrets from jenkins to migrate them to vault hashicorp
I want to know how to use jenkins plugins to list all of ly jenkins credentails with SystemCredentialsProvider
I used :
def credsStore = jenkinsInstance.getExtensionList('com.cloudbees.plugins....
0
votes
0
answers
60
views
Jenkins issue: fatal: not a git repository (or any of the parent directories): .git
We are running Jenkins on a GKE cluster and have observed a strange issue with our multibranch declarative Jenkins pipeline at the beginning of the pipeline execution.
13:27:09 + git config --global -...
0
votes
0
answers
44
views
Jenkins pipeline: Hardcoding a credential in casc.yml
We are using Jenkins pipelines for the CI/CD in our .NET 9 APIs, but I'm new to this, and I'm stuck regarding how to hardcode a specific credential in the casc.yml file.
casc.yml (the place where my ...
0
votes
0
answers
56
views
Jenkins Groovy, how to put variable in oc exec
I would like to get pod name in groovy, and then to use this name to launch script in this namely pod
For example i get pod's name :
def testVar = "Test"
...
0
votes
0
answers
113
views
Completely disable replay option
I would like to disable replay for all jobs, the matrix replay is unchecked. Yet everyone can still replay.
I've removed import hudson.model.* from all of the pipelines, and it's still there and ...
1
vote
1
answer
117
views
Jenkins pipeline operation not permitted
I'm working on a Jenkins pipeline and can't understand why one of my steps can't be executed on the target machines.
Basically, I want to deploy my new code from github repository with Jenkins agent ...
1
vote
1
answer
172
views
Cannot choose between the following variants of com.google.guava:guava:33.2.1-jre:
I've below build.gradle -
buildscript {
repositories {
maven {
name 'jenkins'
url 'https://repo.jenkins-ci.org/releases/'
}
}
}
plugins {
id '...
0
votes
1
answer
64
views
Switch statement unexpected behavior in groovy (case without break)
I have programmed in C and Java and a switch statement like this:
switch (option) {
case 1:
do A;
case 2:
do B;
break;
default:
do C;
break;
}
In those ...
0
votes
0
answers
90
views
Is there a way to use a shared library in Jenkins without hardcoding the branch name?
I have a jenkinsfile in git branch "my-branch" that imports a class.
@Library('my-branch') _
import foo.bar.info.stuff
However sometimes I create copies of the branch for testing e.g my-...