Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Latest commit

 

History

History
53 lines (43 loc) · 1.27 KB

README.md

File metadata and controls

53 lines (43 loc) · 1.27 KB

Build jenkins job docker action

This action runs a Jenkins job at a given URL with optional parameters.

Inputs

inputs:
  job_url:
    description: 'URL for the Jenkins job. i.e. http://jenkins.company.io/job/some-folder/job/test'
    required: true
  jenkins_token:
    description: 'Jekins API Token. 34 characters.'
    required: true
  jenkins_user:
    description: 'Your Jenkins User ID.'
    required: true
  job_params:
    description: 'JSON string of job parameters. i.e "{"foo": "bar", "baz": true, "qux": 3}" '
    required: false
    default: "{}"

Outputs

outputs:
  build_result:
    description: 'Result of the Jenkins build; SUCCESS UNSTABLE FAILURE NOT_BUILT ABORTED'

build_result

  • SUCCESS
  • UNSTABLE
  • FAILURE
  • NOT_BUILT
  • ABORTED

source

example

  - uses: HoldenLucas/build-jenkins-job@v1
    id: build
    with:
      job_url: ${{ secrets.JENKINS_URL }}/job/some-folder/job/test
      jenkins_token: ${{ secrets.JENKINS_TOKEN }}
      jenkins_user: ${{ secrets.JENKINS_USER }}
      job_params: "{"foo": "bar", "baz": true, "qux": 3}"

  - run: echo "Result: ${{ steps.build.outputs.build_result }}"