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

HoldenLucas/build-jenkins-job

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 }}"

About

Github Action which builds a Jenkins job

Resources

License

Stars

Watchers

Forks

Packages

No packages published