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

CLI Build command can determine if there are SCM changes

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: cli
    • Labels:
      None
    • Similar Issues:

      Description

      I have a workflow sitting outside of Jenkins used to manage 26 jobs that run in some dependency order.
      I use the -s build option through the CLI which works quite well, but it rebuilds all 26 modules even if some of them don't require it since last official build.

      The downstream-ext project has determined a way to kick off a downstream job only if it detects SCM projects. This works great, however if I use the "-s build" option
      in the CLI it would return when I'm done with job that has the downstream-ext post build task instead of the real job I'm interested in.

      What would be outstanding is if the logic that is in the downstream-ext plugin to only build if there are scm changes could be either an option to the cli build command or a different command altogether. The -s would be critical with this, otherwise what it really would only be is forcing a SCM poll and not knowing the end result.

      Without this option, I'm forced to deal with state and scm diffs outside of Jenkins. While doable, it would be great if the system handled this.

        Attachments

          Activity

          vanharen Jeremy Van Haren created issue -
          vanharen Jeremy Van Haren made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          vanharen Jeremy Van Haren made changes -
          Attachment 9968.patch [ 20548 ]
          Hide
          vanharen Jeremy Van Haren added a comment -

          I've added a patch that I think will do the trick. But I'm very new to this, any advice would be very helpful.

          Show
          vanharen Jeremy Van Haren added a comment - I've added a patch that I think will do the trick. But I'm very new to this, any advice would be very helpful.
          vanharen Jeremy Van Haren made changes -
          Assignee Jeremy Van Haren [ vanharen ]
          vanharen Jeremy Van Haren made changes -
          Assignee Jeremy Van Haren [ vanharen ]
          vanharen Jeremy Van Haren made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/cli/BuildCommand.java
          core/src/main/java/hudson/cli/CLICommand.java
          http://jenkins-ci.org/commit/jenkins/259477a13a6c6cf1223739b88dd72c2a4f4e0392
          Log:
          [FIXED JENKINS-9968] added an option to do polling before a build.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/cli/BuildCommand.java core/src/main/java/hudson/cli/CLICommand.java http://jenkins-ci.org/commit/jenkins/259477a13a6c6cf1223739b88dd72c2a4f4e0392 Log: [FIXED JENKINS-9968] added an option to do polling before a build.
          scm_issue_link SCM/JIRA link daemon made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #1037
          [FIXED JENKINS-9968] added an option to do polling before a build.

          Kohsuke Kawaguchi : 259477a13a6c6cf1223739b88dd72c2a4f4e0392
          Files :

          • core/src/main/java/hudson/cli/CLICommand.java
          • core/src/main/java/hudson/cli/BuildCommand.java
          • changelog.html
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1037 [FIXED JENKINS-9968] added an option to do polling before a build. Kohsuke Kawaguchi : 259477a13a6c6cf1223739b88dd72c2a4f4e0392 Files : core/src/main/java/hudson/cli/CLICommand.java core/src/main/java/hudson/cli/BuildCommand.java changelog.html
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/cli/BuildCommand.java
          core/src/main/java/hudson/cli/CLICommand.java
          http://jenkins-ci.org/commit/jenkins/259477a13a6c6cf1223739b88dd72c2a4f4e0392
          Log:
          [FIXED JENKINS-9968] added an option to do polling before a build.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/cli/BuildCommand.java core/src/main/java/hudson/cli/CLICommand.java http://jenkins-ci.org/commit/jenkins/259477a13a6c6cf1223739b88dd72c2a4f4e0392 Log: [FIXED JENKINS-9968] added an option to do polling before a build.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/cli/BuildCommand.java
          core/src/main/java/hudson/cli/CLICommand.java
          http://jenkins-ci.org/commit/jenkins/259477a13a6c6cf1223739b88dd72c2a4f4e0392
          Log:
          [FIXED JENKINS-9968] added an option to do polling before a build.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/cli/BuildCommand.java core/src/main/java/hudson/cli/CLICommand.java http://jenkins-ci.org/commit/jenkins/259477a13a6c6cf1223739b88dd72c2a4f4e0392 Log: [FIXED JENKINS-9968] added an option to do polling before a build.
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 140156 ] JNJira + In-Review [ 188876 ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            vanharen Jeremy Van Haren
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: