Questions tagged [jenkins-scriptler]

The Jenkins Scriptler Plugin allows you to store/edit groovy scripts and execute it on any of the slaves/nodes of a Jenkins instance.

The Jenkins Scriptler Plugin allows you to store/edit groovy scripts and execute it on any of the slaves/nodes of a instance.

88 questions
4
votes
1 answer

Jenkins - Email-ext plugin - Templates

I am using the Jenkins plugin called email-ext and I want to get Jenkins to send an email generated from the html.jelly template which is located in $JENKINS_HOME/email-templates. The email should be always send when the code of a specific repo is…
4
votes
1 answer

Returning a list of files in Groovy sorted by modified time

I’m trying to return a list of directories to populate a drop down menu in Jenkins (Scriptler). This is what I have so far: import groovy.io.FileType String snapshotBase="/(path-I-wish-to-look-at)/" def result=[];assert result.size()==0 def…
ProllyOtter
  • 43
  • 1
  • 4
4
votes
1 answer

Jenkins Groovy: What triggered the build

I was thinking of using a Groovy script for my build job in Jenkins because I have some conditions to check for that might need access to Jenkins API. Is it possible to find out who or what triggered the build from a Groovy script? Either an SCM…
DJViking
  • 832
  • 1
  • 12
  • 29
4
votes
2 answers

How to change a Git URL in all Jenkins jobs

I have more than 100 jobs in Jenkins and I have to change a Git URL in each and every job since we changed the git server. I must traverse each job and change the Git URL. Can anyone help me with a groovy script? I was able to traverse each job,…
3
votes
1 answer

How to Pass Active Choices Reactive Parameters to Scriptler

I have used one ACP( by selecting one value from dropdown) and the value should be passed on to the immediate ACRP scriptler but its not doing this. my usecase is : a dropdown --- > select one value pass this selected value to scripler in the…
Vam
  • 123
  • 1
  • 2
  • 9
3
votes
2 answers

cloudbees, groovy, jobs, folders: How to determine the job result, if the job is within a cloudbees folder?

Problem: I'm using a script to determine if a certain amount of jobs are in SUCCESS state. It worked fine as long as I was not using cloudbees folder plugin. I could easily get the list of projects and get the project result. But after I moved the…
alexrjs
  • 546
  • 8
  • 15
3
votes
2 answers

Renaming a Jenkins Job

I have renamed a Jenkins Job from the Jenkins GUI. I changed the Project name in the Configure menu and hitting Save afterwards. However the workspace name for this Jenkins job has not been changed. What I am finding is upon the job execution a new…
2
votes
0 answers

hudson.remoting.ProxyException: groovy.lang.MissingPropertyException: No such property: any for class:

I have jenkins Declarative pipeline, where I load sub_mudule with Declarative pipeline too. #!groovy def jenkins_ci_examples = [String:Object] def secrets_vault = "secrets_vault.groovy" def vars=[String:Object]; pipeline { agent any …
2
votes
1 answer

Can not execute connection to Postgres via Jenkins Groovy

Using Scriptler can not connect to Postgresql via Jenkins groovy, neither via executing psql command, nor via using jdbc: psql command = """ PGPASSWORD=1111\ psql -h xxxx.rds.amazonaws.com\ -U master -d yyy -c "select *…
user3909893
  • 421
  • 1
  • 4
  • 15
2
votes
0 answers

How to determine all events in Jenkins that Started by timer?

I inherited a Jenkins server that has a lot of redundant processes and mixture of plugins and scriptlers. I have one process that runs on a weekly bases, but can't seem to locate the origin of this process. Is there any way to get a list of…
Dzerlig
  • 247
  • 2
  • 10
2
votes
1 answer

How do i push to the git-repo of Scriptler?

From https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin Git Scriptler exposes its scripts via git. Browse to JENKINS_URL/scriptler.git on your installation to get more info about how to access the repo via git. This allows an…
2
votes
0 answers

How Can I trigger a job inside a folder using Parameterized Remote Trigger Plugin checking the state of the job

I am using Parameterized Remote Trigger Plugin to trigger a job from remote server. I could trigger a job which is directly in the server. My Questions : How can I mention a job name which is inside a folder as TestFolder\TestJob ? How Can I check…
2
votes
3 answers

find env variables for a all builds for a job on jenkins

I need to monitor what are the changes going with a job on jenkins(update the changes to a file). Need to list the env variables of a job. JOB_NAME,BUILD_NUMBER,BUILD_STATUS,GIT_URL for that build(all the builds of a job). I didn't find out a good…
user6136315
  • 695
  • 4
  • 13
  • 37
2
votes
1 answer

Are 2 jobs running in pipeline of jenkins thread safe?

I am running two jobs in jenkins in two pipeline. These two projects use build parameter from a previous build. These build parameters are created as follows: def buildVariables = lastSuccBuild.getBuildVariables() nextPluginVersion =…
2
votes
1 answer

Calling a Scriptler script within another Scriptler script

I'm using the Scriptler plugin for Jenkins, and am having a hard time finding any information on how to share the scriptler scripts I'm writing between scripts. I've tried using the ScriptHelper from the Scriptler API, but have run into issues when…