Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8743

The ability to kick off a bulk build via the url for scripting reasons

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Use Case:
      We have an automated beta environment which is refreshed every couple of days. Each project that is on beta at any given time is setup in Jenkins with a certain naming convention so we can create views and use the bulk builder functionality to kick all the builds off if needed. What would be great, is if we can kick off a whole set of jobs using Bulk Builder via the refresh script that configures our beta environment using a url.

      Either:

      • Save a regular expression that is then exposed via an url
      • Expose Bulk Builder functionality on the url itself

        Attachments

          Activity

          Hide
          swestcott Simon Westcott added a comment - - edited

          The second option is already available to you. Curl the following URLs,

          • /bulkbuilder/build?build=all
          • /bulkbuilder/build?build=failed
          • /bulkbuilder/build?build=pattern&pattern=blah
          Show
          swestcott Simon Westcott added a comment - - edited The second option is already available to you. Curl the following URLs, /bulkbuilder/build?build=all /bulkbuilder/build?build=failed /bulkbuilder/build?build=pattern&pattern=blah
          Hide
          swestcott Simon Westcott added a comment -

          Depending on your setup, this won't work when JENKINS-8936 is fixed. Guess I need to expose the model class via Jenkins' API.

          Show
          swestcott Simon Westcott added a comment - Depending on your setup, this won't work when JENKINS-8936 is fixed. Guess I need to expose the model class via Jenkins' API.
          Hide
          swestcott Simon Westcott added a comment -

          After fixing a NPE (pushed to GitHub, but not released yet) the following curl commands work

          curl -X POST http://localhost:8080/bulkbuilder/build -d build=all
          
          curl -X POST http://localhost:8080/bulkbuilder/build -d build=failed
          
          curl -X POST http://localhost:8080/bulkbuilder/build -d build=pattern -d pattern=foo
          

          If you have security enabled in Jenkins/Hudson then include,

          -u username:password
          
          Show
          swestcott Simon Westcott added a comment - After fixing a NPE (pushed to GitHub, but not released yet) the following curl commands work curl -X POST http: //localhost:8080/bulkbuilder/build -d build=all curl -X POST http: //localhost:8080/bulkbuilder/build -d build=failed curl -X POST http: //localhost:8080/bulkbuilder/build -d build=pattern -d pattern=foo If you have security enabled in Jenkins/Hudson then include, -u username:password
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Simon Westcott
          Path:
          src/main/java/org/jvnet/hudson/plugins/bulkbuilder/model/BulkParamProcessor.java
          http://jenkins-ci.org/commit/bulk-builder-plugin/23fbd9367c68c23a77b020bf176535c769b38c3e
          Log:
          [Ref JENKINS-8743] Fixed NPE when 'params' is missing from request

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Simon Westcott Path: src/main/java/org/jvnet/hudson/plugins/bulkbuilder/model/BulkParamProcessor.java http://jenkins-ci.org/commit/bulk-builder-plugin/23fbd9367c68c23a77b020bf176535c769b38c3e Log: [Ref JENKINS-8743] Fixed NPE when 'params' is missing from request
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Si Westcott
          Path:
          src/main/java/org/jvnet/hudson/plugins/bulkbuilder/model/Builder.java
          src/main/java/org/jvnet/hudson/plugins/bulkbuilder/model/BulkParamProcessor.java
          http://jenkins-ci.org/commit/bulk-builder-plugin/ec18bc89aaaf95ea7e5b92554221f4f81946864f
          Log:
          Merge pull request #2 from swestcott/master

          Ref JENKINS-8743

          Compare: https://github.com/jenkinsci/bulk-builder-plugin/compare/25e3eb2...ec18bc8

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Si Westcott Path: src/main/java/org/jvnet/hudson/plugins/bulkbuilder/model/Builder.java src/main/java/org/jvnet/hudson/plugins/bulkbuilder/model/BulkParamProcessor.java http://jenkins-ci.org/commit/bulk-builder-plugin/ec18bc89aaaf95ea7e5b92554221f4f81946864f Log: Merge pull request #2 from swestcott/master Ref JENKINS-8743 Compare: https://github.com/jenkinsci/bulk-builder-plugin/compare/25e3eb2...ec18bc8
          Hide
          swestcott Simon Westcott added a comment -

          Version 1.0 release, should be available in the update centre within 24/48hrs.

          Show
          swestcott Simon Westcott added a comment - Version 1.0 release, should be available in the update centre within 24/48hrs.

            People

            Assignee:
            swestcott Simon Westcott
            Reporter:
            benmatselby Ben Selby
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: