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

CLI Build command can determine if there are SCM changes

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • cli
    • None

      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.

          [JENKINS-9968] CLI Build command can determine if there are SCM changes

          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.

          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.

          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/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.

          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

          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

          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/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.

          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/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.

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

              Created:
              Updated:
              Resolved: