TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Run a Jenkins job

    Linux
    1
    1
    944
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RussR
      Russ
      last edited by Russ

      Thanks to @muvvala-g for this idea.

      1. Download the jenkins-cli.jar file with this command:
      wget http://localhost:8080/jnlpJars/jenkins-cli.jar
      
      1. Setup a TRIGGERcmd command that runs your Jenkins job with a command like this:
      java -jar jenkins-cli.jar -s http://localhost:8080 -http -auth admin:PASSWORD build MyJob -v -s
      

      If your Jenkins server uses HTTPS, then change the URL accordingly, and remove the -http parameter.

      Using TRIGGERcmd for this is more secure than this approach because there's no need for an in-bound port on your firewall pointing to your Jenkins server.

      Russell VanderMey

      1 Reply Last reply Reply Quote 0
      • First post
        Last post