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

Build was triggered although path was not inlcuded in "polling ignore certain paths"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • git-plugin
    • None

      Scenario:

                      Jenkins Master : No Executors , Linux Docker Container

                      Jenkins Slave : One Executor , Windows 10

                     Git Repository Structure :

                         /_CommonBuild

                         /afx_mfc100_ressources/_Build

                         /libs/ejsoncpp/_Build

                     Pipeline Jobs:

                         AfxMfc100Ressources (Jenkinsfile not from SCM, see attachment  afx_mfc100_ressources_DeclarationInJob )

                         ejsoncpp (Jenkinsfile from SCM, see attachment ejsoncpp_Jenkinsfile)

       

      In pipeline "ejsoncpp" there are following entries in the "Included Regions" field of "Polling ignores commits od certain paths"

              _CommonBuild/.*

              libs/ejsoncpp/.*

       

      Steps I did:

      1. I was deleting a file "test.txt" in folder "/afx_mfc100_ressources"
      2. Wait of polling intervall in my case about 2 minutes

      Result:

             Pipeline "AfxMfc100Ressources" was triggered by SCM change.

             Pipeline "ejsoncpp"  was triggered by SCM change, although "/afx_mfc100_ressources"  was not set in the "Included Regions"

      My Conclusion:

      For me it seems that the check of the whitelist ("Included Regions") worked (see bolded text below in polling log) but the trigger happens anyway.

      After that I made another test and I copied the content within the Jenkinsfile of Pipeline "ejsoncpp" directly into the pipeline configuration ( Definition->Pipline Script). I repeated the steps I did before. Then the scenario worked as expected. Only Pipline "AfxMfc100Ressources" was triggered by SCM change. That was really strange!

       

      Here the change I made in git log:

      X:\MainRepositories\global>git log --full-history --no-abbrev --format=raw -M -m --raw 2db37887a067046f1f805a8330d4b1da97d0fac2..d64d2a46ffe914e2059fe6b0a5b2f820ee2742fc
      commit d64d2a46ffe914e2059fe6b0a5b2f820ee2742fc
      tree d77198419264184a5370df94e585e9c21e2c3fc7
      parent 2db37887a067046f1f805a8330d4b1da97d0fac2
      author Andreas Kuttruff <andreas.kuttruff@estos.de> 1667890694 +0100
      committer Andreas Kuttruff <andreas.kuttruff@estos.de> 1667890694 +0100

          TCCI-45 22 test remove

      :100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D      afx_mfc100_ressources/test.txt

       

      Here the polling Log of pipeline "ejsoncpp":

       > git --version # 'git version 2.30.2'
      using GIT_ASKPASS to set credentials estos build user
       > git ls-remote -h – https://git.estos.de/scm/wgl/global.git # timeout=10
      Found 4 remote heads on https://git.estos.de/scm/wgl/global.git
      Ignoring refs/heads/feature/UCCON-1268 as it doesn't match any of the configured refspecs
      Ignoring refs/heads/feature/CC-2490-change-from-hand-written-json-to-json-stringify as it doesn't match any of the configured refspecs
      Ignoring refs/heads/hotfix/CC-3073-snacc-compiler-tsasn1base.ts-adopted-to-a-bug-in-ucweb as it doesn't match any of the configured refspecs
      [poll] Latest remote head revision on refs/heads/master is: d64d2a46ffe914e2059fe6b0a5b2f820ee2742fc
      Using strategy: Default
      [poll] Last Built Revision: Revision 2db37887a067046f1f805a8330d4b1da97d0fac2 (refs/remotes/origin/master)
      The recommended git tool is: NONE
      using credential 7e651ef9-bae5-4994-90c4-7fb26488b3fb
       > git rev-parse --resolve-git-dir C:\JenkinsSlave\workspace\EstosGlobal\ejsoncpp\global\.git # timeout=10
      Fetching changes from the remote Git repositories
       > git config remote.origin.url https://git.estos.de/scm/wgl/global.git # timeout=10
      Fetching upstream changes from https://git.estos.de/scm/wgl/global.git
       > git --version # timeout=10
       > git --version # 'git version 2.35.1.windows.2'
      using GIT_ASKPASS to set credentials estos build user
       > git fetch --no-tags --force --progress – https://git.estos.de/scm/wgl/global.git +refs/heads/master:refs/remotes/origin/master # timeout=10
      Polling for changes in
       > git rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
       > git log --full-history --no-abbrev --format=raw -M -m --raw 2db37887a067046f1f805a8330d4b1da97d0fac2..d64d2a46ffe914e2059fe6b0a5b2f820ee2742fc # timeout=10
      Ignored commit d64d2a46ffe914e2059fe6b0a5b2f820ee2742fc: No paths matched included region whitelist
      Done. Took 2.6 sec
      Changes found
      Jenkins 2.376

            Unassigned Unassigned
            andreas_kuttruff Andreas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: