Git Product home page Git Product logo

build-jenkins-job's Introduction

Build jenkins job from GitHub Action ๐Ÿš€

This action creates/triggers a Jenkins job, waits for it to finish, and allows you to pass job parameters. This action also supports HTTPS and a custom port for Jenkins.

Inputs

jenkins-token

Your Jenkins token. See this post for information on how to generate one

Required

jenkins-url

The URL should look like this: github.com and not https://github.com or github.com:8080

Required

jenkins-user

The Jenkins user to use

Required

job-path

Required

E.g.

if job inside folder:
 "job/folder_name/job/job_name"

if job in jenkins root: 
 "job/job_name"

jenkins-port

The jenkins server port, the default port for HTTP (non-secure) is 80 and 443 for HTTPS (secure)

Required

job-params

Not mandatory

Set jenkins params as JSON string:

E.g.

 "{\"param1\": \"value1\", \"param2\": \"value2\"}"

is-secure

Not mandatory

Set to true if you are trying to connect to a HTTPS server, default is false

Outputs

status/result

  • FAILURE
  • SUCCESS
  • ABORTED

Example usage

    - name: "Trigger jenkins job"
      uses: Paloudi/build-jenkins-job@master
      with:
        jenkins-url: ${{ secrets.JENKINS_URL }}
        jenkins-port: ${{ secrets.JENKINS_PORT }}
        jenkins-token: ${{ secrets.JENKINS_TOKEN }}
        user: "jenkins-username"
        job-path: "job/folder_name/job/job_name"
        job-params: "{\"param1\": \"value1\", \"param2\": \"value2\"}"
        is-secure: true
        
    - name: Get job status
      run: echo "Job status is ${{ steps.job-build.outputs.job_status }}"

build-jenkins-job's People

Contributors

guillempuigcom avatar tomas-chudjak avatar paloudi avatar

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.