vbehar / jenkins-rundeck-plugin Goto Github PK
View Code? Open in Web Editor NEWJenkins plugin for RunDeck integration : trigger, notifier and option provider.
Home Page: http://wiki.jenkins-ci.org/display/JENKINS/RunDeck+Plugin
Jenkins plugin for RunDeck integration : trigger, notifier and option provider.
Home Page: http://wiki.jenkins-ci.org/display/JENKINS/RunDeck+Plugin
Jenkins RunDeck plugin http://wiki.jenkins-ci.org/display/JENKINS/RunDeck+Plugin This plugin is a Jenkins Notifier (Publisher) that will talk to a RunDeck instance (via its HTTP API) to schedule a job execution on RunDeck after a successful build on Jenkins. It is also a Jenkins Trigger, that will schedule a build on Jenkins after a job execution on RunDeck (using RunDeck WebHook Notification). In addition, it turns Jenkins into an "Option provider" for RunDeck, if you want to use your Jenkins build artifacts as an option to a RunDeck job. We use it to do a 0-click deployment : from commit to deploy, automatically. Jenkins build the project, and RunDeck deploys it. This plugin does the link between these 2 tools. * Jenkins : http://www.jenkins-ci.org * RunDeck : http://www.rundeck.org * Plugin documentation : http://wiki.jenkins-ci.org/display/JENKINS/RunDeck+Plugin
I have a jenkins job that calls a job via the rundeck plugin. I would like to define the option value using jenkins build data and have it expanded when the rundeck job is called.
This would work similar to how an "execute shell" build step can use them.
For example, here several env vars are set for a property named "artifact".
artifact=$JOB_URL/$BUILD_NUMBER/artifact/dist/simple-$SVN_REVISION.war
It appears this data is currently not available.
Currently auth token (API key) in Jenkins is kept in plain text format and can be seen using Jenkins/project configuration page and by browsing Jenkins configuration files.
Fortunately access to those pages should be restricted and in addition auth token allows an attacker to smaller number of operations. Nevertheless having na auth token allows to execute arbitrary operation as the user configured in Jenkins. In addition it complicates bootstrapping Jenkins instances (as that file has to be additionally protected).
After upgrading from version 3.6.7 to version 3.6.9, my Jenkins job crashes.
Here are the extracts of logs of the executions with the 2 versions of the plugin:
rundeck-3.6.7
[Pipeline] step
Instance 'rundeck-int' with rundeck user '*****': Notifying Rundeck...
Looking for jobId : d210c99c-e08b-45ca-8221-f0c68169999
Notification succeeded ! Execution #150108, at http://********/api/36/execution/150108 (status : RUNNING)
Waiting for Rundeck execution to finish...
Rundeck execution #150108 finished in 3 seconds, with status : SUCCEEDED
rundeck-3.6.9
[Pipeline] step
Instance 'rundeck-int' with rundeck user '*******': Notifying Rundeck...
Looking for jobId : d210c99c-e08b-45ca-8221-f0c6816ddd4
Notification succeeded ! Execution #150109, at http://*********/project/TECOP_OL/execution/show/150109 (status : running)
Waiting for Rundeck execution to finish...
Rundeck execution #150109 finished in null, with status : running
Error while talking to Rundeck's API at http://*********** : null
[Pipeline] }
[Pipeline] // dir
[Pipeline] }
[Pipeline] // stage
[Pipeline] ansiColor
[Pipeline] {
[Pipeline] echo
❌ hudson.AbortException: Error while talking to Rundeck's API at http://*********** : null ❌
You can note the difference of case in the statuses returned by Rundeck: uppercase in 3.6.7 and lowecase in 3.6.9.
Maybe the problem is in this block ?
My configuration:
Jenkins 2.263.1
Rundeck 3.3.6-20201111
Any fix?
It seems currently to limit the number of Rundeck jobs to one per Jenkins job.
Not sure if should have put the issue on git but I initially added here; https://issues.jenkins-ci.org/browse/JENKINS-14933. Sorry for the duplicate or double post.
Our rundeck instance is behind proxy, for example: http://my-site/rundeck
when configuring rundeck instance on jenkins main configurations we must add /
in the end of the url(otherwise test connection will failed).
but when configuring specific job to execute rundeck job according to job uuid it seems like it failed to read the job from rundeck, because it concatenating additional /
in the end.
Any solution?
stage('Deliver') {
steps {
sh 'echo DELIVERED > /tmp/jenkins.trace'
/*script {
step([$class: "RundeckNotifier",
includeRundeckLogs: true,
jobId: "de9bcfaf-f4a7-45e6-9dde-ff4a4dec4397",
nodeFilters: "",
options: """
jobName=$JOB_NAME
buildNumber=$BUILD_NUMBER
version=LATEST
""",
rundeckInstance: "Default",
shouldFailTheBuild: true,
shouldWaitForRundeckJob: true,
tags: "",
tailLog: true])
}*/
}
post {
success {
echo 'SUCCESS'
}
}
}
Hi,
I set up Jenkins with matrix-based security against Active Directory.
What's the minimum grants needed for webhooks to work ?
Thanks.
In my jenkins job config.xml, I have
fibble
However, the call to GET /api/1/job/1d34acda-66f0-431c-bb26-66f80bf9d41b/run does not mention 'fibble' and RunDeck does not apply the filter.
Edit: closing, expected format is tags = fibble
Hi,
It seems the plugin is not treating "start" notifications received from Rundeck.
Talked to Greg about it, it seems to be around this file.
Sorry, I don't know the language, I can't provide a patch.
I am using Rundeck version 2.10.6. And using Jenkins Rundeck plugin version 3.6.6 on Jenkins version 2.176.3. When i tried connect from Jenkins to Rundeck using https protocol (https://rundeck-instance) with Auth Token or with login/password, i get error messages - "We couldn't find a live Rundeck instance at https://rundeck-instance". Maybe someone have the same or advise some fix, workaroud etc.
I am using the Rundeck 2.11 launcher on Redhat 6.X. I am running Rundeck on a custom SSL port (port 5443). The Rundeck process is up and fully functional, yet when I configured the Plugin in Jenkins to connect to https://:5443 I receive the message "We couldn't find a live Rundeck instance at https://:5443".
I spun up a fresh instance of rundeck with default 4440 port and Non-SSL & the plugin in Jenkins works like a charm.
I have multiple rundeck servers but only one jenkins. I need to be able to run jobs against the various rundecks and not just a single one as supported by the plugin's global options.
Currently the configuration of rundeck credentials is not possible within a single job configuration.
The jenins-wide global configuration is not suitable in every environment, since someone authenticates on per user-basis with different permissions on different rundeck-jobs.
Is it possible to enable the configuration of the credentials within a job configuration, ideally thru job environment variables?
See https://issues.jenkins-ci.org/browse/JENKINS-21802
Steps to reproduce:
--> Result: jenkins crashes with no error in logs
Hi Vincent,
I’m trying to setup the Jenkins plugin for RunDeck but I keep getting this error (please see below) when I set the job options to pkgname=$ARTIFACT_NAME{.*.deb}. I’m using Jenkins v 1.465 and plugin version 2.11
Notifying RunDeck...
ERROR: Publisher org.jenkinsci.plugins.rundeck.RundeckNotifier aborted due to exception
java.lang.IndexOutOfBoundsException: Illegal start index
at java.util.regex.Matcher.find(Matcher.java:576)
at org.jenkinsci.plugins.rundeck.RundeckNotifier.parseProperties(RundeckNotifier.java:233)
at org.jenkinsci.plugins.rundeck.RundeckNotifier.notifyRundeck(RundeckNotifier.java:162)
at org.jenkinsci.plugins.rundeck.RundeckNotifier.perform(RundeckNotifier.java:97)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:685)
at hudson.model.Build$RunnerImpl.post2(Build.java:162)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:632)
at hudson.model.Run.run(Run.java:1459)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:239)
The link to a rundeck job from the jenkins build history is "http://localhost:4440" even when the URL parameter is set in jenkins settings (global). This should ideally use that URL when the parameter is set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.