Giter Club home page Giter Club logo

jenkins-rundeck-plugin's Introduction

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

jenkins-rundeck-plugin's People

Contributors

alanharder avatar gschueler avatar ndeloof avatar vbehar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

jenkins-rundeck-plugin's Issues

Provide build data to job options

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.

Rundeck auth token should not be kept in plain text form

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).

RundeckApiException due to a lowercase error

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 ?

switch (execution.getStatus()) {
case SUCCEEDED:
return true;
case ABORTED:
case FAILED:
return false;
default:
return true;
}

My configuration:
Jenkins 2.263.1
Rundeck 3.3.6-20201111

Any fix?

rundeck behind proxy

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?

Invalid Rundeck configuration

  • Rundeck endpoint has been configured in Jenkins and connection test is successful. However
    The job fails when reaching this stage below (We are using a multibranch declarative pipeline). The error is : Invalid Rundeck configuration. I don't see what is invalid in the configuration below???
  • Note that I can successfully trigger Rundeck job using a simple curl command.
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'
                                }
                        }
                }

NodeFilter ignored

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

Unable to connect to Rundeck instance using port 5443 over SSL

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.

feature request: Rundeck-Credentials per job

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?

IndexOutOfBoundsException: Illegal start index with ARTIFACT_NAME

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.