I am using RTC plugin for get source from IBM Rational Teamconcert in Jenkins, but how can I pass the parameter that I declared using This project is parameterized plugin like the image below
I used %variable_name% but not successful.
You can see an example of a String parameter used in the Job Configuration section of this plugin.
However, make sure your Jenkins is running on Windows if you want to use %A_VARIABLE% syntax.
If it runs on Linux, that would be ${A_VARIABLE}.
Related
Using Jenkins Job Builder I'm trying to write a job description, which uses Filesystem List Parameter plugin. However I can't find in Jenkins Job Builder documentation any mention of this plugin or parameter.
Does jjb let use of this plugin or it isn't supported?
If it isn't what would be the different way to have same parameter type without using that plugin?
I want to send some specific notifications (REST API) back to our server, which triggered our Jenkins build jobs via REST API. For this, I am about to include a jar of our own, which has a lot of convenience methods in it.
I am able to use the jars inside the Groovy Script by utilizing #Grab, that's fine.
But it doesn't seem to work from within Groovy Postbuild Plugin.
It even doesn't recognize referenced script files from within another package, which is next to the script file.
Is there a workaround? How can I send my specific notification using java or groovy and the methods provided in our own jar? Do I need to write a Jenkins Plugin for this (hope not). Thanks in advance, Anne
I would actually recommend to changing your jobs over to Jenkins Declarative pipeline. Then you can use the post handling built into the Jenkins pipeline language. You then have some options. You could use the pipeline steps provided by the HTTP Request plugin to call REST APIs, create a Java tool to call your REST APIs using your Jar library (install as a custom tool which can be used from pipeline) or write a custom plugin to provide the pipeline steps. If you decide to write a plugin have a look at the Webhook Step plugin for how to do it - https://github.com/jenkinsci/webhook-step-plugin. Your best bet might be a custom Java command line tool called from a pipeline shell step (sh or bat) depending on the agent / slave OS you use.
I have a grails app that depends on a custom grails plugin. In Jenkins, I want the release build for the app to depend on the latest promoted release build of the plugin. So, I thought I'd put a conditional in the BuildConfig.groovy to use an environment variable that has that value. So now I need a way to set an environment variable in Jenkins to the latest build number of that other job. Is there a way to do that?
If you can do the envisioned workflow manually (e.g. going into the main configuration and change a environment variable there), then you should be able to automate it using the Jenkins Command Line Interface. However, you can not directly change an environment variable in one job and read that changed value in another job.
I have a gradle tasks that deploys some stuff to bintray using curl.
For this to work it needs my bintray api key. I don't want to put that in my build script (or a property file) since all this stuff is hosted in plain sight at github.
Instead I made the task use a property named bintrayApikey which is to be provided when calling gradle. When I run it locally using
gradlew pushToBintray -DbintrayApikey=<my api key>
everything works as intended.
So the next step is to make this work from my Jenkins over at cloudbees. Since there doesn't seem to be a special place for putting system properties I just added them to the tasks, but this does not seem to work. In the console I can see it is accessing bintray all right, but then finishes with:
This resource requires authentication
So how can I provide the property value in my jenkins job configuration?
Use -Pmyprop instead of -Dmyprop.
The Gradle Jenkins Plugin accepts parameters with -P.
-D is for java parameters.
I'd like to start a build for a job named project-${X} where ${X} is given by a parameter of the current build. Does this work, maybe with a plugin?
Thanks,
Carsten
Parameterized Trigger plugin has that feature. You need to use the latest version (2.15) - there seems to be a bug in earlier versions.
Your other options seem to be Python JenkinsAPI wrapper or Groovy run via Groovy Plugin that accesses Jenkins via its Java API.