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

Run a Jenkins job

Linux
1
1
1.1k
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.
  • R
    Russ
    last edited by Russ Jun 2, 2019, 6:50 PM Jun 2, 2019, 4:26 PM

    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
    1 out of 1
    • First post
      1/1
      Last post