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

Builds which should ignore commits in certain paths build anyway when no workspace is available

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None
    • git plugin: 2.4.0
      gitolite server using notifyCommit

      This issue relates to the comment here.

      We use notifyCommit and the "Polling ignores commits in certain paths" option of the git plugin. This works well for the most part, except when the node used to build the project does not have a workspace:

      Polling log when there is a workspace:

      Started on 15-Aug-2016 10:50:16
      Polling SCM changes on ci-jenkinsslavef-005
      Using strategy: Default
      [poll] Last Built Revision: Revision 066a44ba25df315a04e74fcccb357ae263e5b0f2 (origin/master)
      > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repositories
      > git config remote.origin.url http://git/git/exemplar.git # timeout=10
      Fetching upstream changes from http://git/git/exemplar.git
      > git --version # timeout=10
      > git -c core.askpass=true fetch --tags --progress http://git/git/exemplar.git +refs/heads/:refs/remotes/origin/
      Polling for changes in
      > git rev-parse origin/master^

      Unknown macro: {commit}

      # timeout=10
      > git log --full-history --no-abbrev --format=raw -M -m --raw 066a44ba25df315a04e74fcccb357ae263e5b0f2..0ce3e7603c9facc5ebabfa60c31349345169a630 # timeout=10
      Ignored commit 0ce3e7603c9facc5ebabfa60c31349345169a630: No paths matched included region whitelist
      Done. Took 0.1 sec
      No changes

      Polling log when there is no workspace (rm'd workspace/$job on the node it last built on)

      Started on 15-Aug-2016 10:51:55
      No workspace is available, so can't check for updates.
      Scheduling a new build to get a workspace. (nonexisting_workspace)
      Done. Took 64 ms
      Changes found

      Unfortunately for us, when the project is built, it has effects downstream that we want to avoid. I understand that remote polling is not available with some of the more complex rules that require a git clone, but I would expect the repository to be cloned and checked without performing all the rest of the build steps.

      I get the same behaviour whether the job is configured with "Force polling using workspace" option or not.

      I'm not aware of any workaround at the moment. Is there any way to avoid triggering a full build in this case?

            Unassigned Unassigned
            grahamallan Graham Allan
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: