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

multibranch pipeline scan acquires Jenkinsfile from an old commit

XMLWordPrintable

      Same issue as https://issues.jenkins.io/browse/JENKINS-57097

      but Im using Gitlab.

      The first time I create the multi-branch pipeline and scan the repo Jenkins retrieves the correct Jenkinsfile. But when I amend the commit and push, the next scan will continue to use the Jenkinsfile from the old commit:

      Verifying host key using known hosts file, will automatically accept unseen keys
       > "C:\Program Files\Git\bin\git.exe" fetch --tags --force --progress --prune -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10
      Checking tags...
        Checking tag 2.2.15
            ‘Jenkinsfile’ found
          Met criteria
      Changes detected: 2.2.15 (null → f21197535346b4278d8466abed6b0b88a104bee9)

      Where "f21197535346b4278d8466abed6b0b88a104bee9" is the old commit.

      In the old pipeline plugin there was a way to provide a custom Jenkinsfile in the config, but in multi-branch pipeline plugin the only Build Configuration > Mode is by Jenkinsfile with a path. So Im completely stuck. I cant setup a build job where I cant change the Jenkinsfile.

            Unassigned Unassigned
            delany Delany
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: