HUB
Sign inSign up

projectnebula/jenkins-job-runner

By projectnebula

•Updated over 6 years ago

The Jenkins job runner task runs a parameterized build on a Jenkins instance.

Image
0

1.4K

projectnebula/jenkins-job-runner repository overview

⁠Jenkins job runner

The Jenkins job runner step container runs a parameterized build on a Jenkins instance.

⁠Specifications

SettingChild settingData typeDescriptionDefaultRequired
masterURLstringThe fully-qualified HTTP URL to the Jenkins master instance.NoneTrue
credentialsmappingA map of cert credentials to use for authenticating with Jenkins.NoneTrue
methodstringThe method to use to authenticate to Jenkins. Currently the only valid value is http.NoneTrue
userstringThe Jenkins username to use for authentication.NoneTrue
tokenstringFor http authentication, the API token to use for authentication.NoneTrue
jobstringThe complete ID of the job or project to build.NoneTrue
parametersmappingA mapping of parameters for building the job.NoneFalse
qeueOptionsmappingA mapping of Jenkins queue options.NoneTrue
waitForstringThe level of completion to wait for after enqueuing this Jenkins build. If set to none, this task completes successfully as soon as the corresponding build is enqueued. If set to build, this task completes when the Jenkins build completes, succeeding only if the build succeeds. If set to downstreams, this task completes when all downstream project builds of the Jenkins build complete. If any downstream build fails, this task also fails.buildFalse
timeoutSecondsintegerThe amount of time to wait for a build to start.3600False
cancelOnTimeoutbooleanWhether the Jenkins build should be canceled if a timeout occurs.falseFalse

Note: The value you set for a secret must be a string. If you have multiple key-value pairs to pass into the secret, or your secret is the contents of a file, you must encode the values using base64 encoding, and use the encoded string as the secret value.

⁠Examples

Here is an example of the step in a Nebula workflow:

steps:

...

- name: jenkins
  image: projectnebula/jenkins-job-runner:latest
  spec:
    masterURL: http://example.com
    credentials: 
      method: http
      user: my-username
      token: 
        $type: Secret
        name: token
    job: my-jenkins-job
    parameters: 
      HOST: web2
      VERSION: 287
      DB_UPDATE: true
    queueOptions:
      waitFor: downstreams
      timeoutSeconds: 5000
      cancelOnTimeout: false
Tag summary
Recent tags
Content type
Image
Digest
Size
24 MB
Last updated
over 6 years ago
docker pull projectnebula/jenkins-job-runner:latest