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?
Related
I have a requirement to access build parameters in my custom Jenkins plugin.
I searched everywhere. But I couldn't find an answer.
How can I access build parameters in my custom Jenkins plugin code?
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 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}.
I want to build a Common Jenkinsfile for a couple of Build Jobs in different languages. And then I want to add a specific Jenkinsfile that depends on some parameters.
For example: the common file should contain information about Docker Hub and Nexus Repository. It's always the same. And the specific file should contain language specific build steps.
Is it possible to "include" another file?
Using the Pipeline Shared Groovy Libraries Plugin it is possible to define your own Job DSL. This section of the plugin's manual explains how to do this.
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.