Replies: 3 comments
-
Hello, is this enhancement request closed? The plugin infers that the repository being tracked by the hook is the same one where the Pipeline Job from SCM script is being pulled from. It works okay if you have the Jenkinsfile in the same repo as the code, but it may not be always the case. I may have a generic pipeline Jenkinsfile for all the Java projects that receives $GIT_URL and $BRANCH_NAME as parameters, and runs the same Maven on them. I recognize that this is a good candidate for a shared lib, but I digress. Could the plug-in be parameterized so we can input the repository name/url, instead of using the Jenkins SCM config? |
Beta Was this translation helpful? Give feedback.
-
any update on this issue? |
Beta Was this translation helpful? Give feedback.
-
any update on this issue? |
Beta Was this translation helpful? Give feedback.
-
Please make sure all the following boxes are checked before submitting your feature request - thank you!
Expected Behavior
The plugin should not force setting GIT SCM in JOB in case of pipeline. Thus the GIT checkout configuration could be dynamic and according to the source branch and payload repository
Actual Behavior
I created a single JOB pipeline to receive the pull request from any repository. Inside the pipeline is checked out by the source branch and the name of the repository coming from payload.
I also use a shared library where my pipelines are centralized. Every time a job runs, this library is downloaded to the local branch. Since a repository has not been set up in the job (it should not, as it must be generic), the plugin tries to match the local branch (in this case the shared library) and the remote url (coming from webhook bitbucket) and how it is different , discards the JOB
Possible Solution
I could have a checkbox to skip the match on io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe.matchGitScm and let me manage the source branch checkout in the pipeline
Steps to Reproduce
Context
How has this issue affected you? What are you trying to accomplish?
Providing context helps us come up with a solution that is most useful in the real world.
Bitbucket payload
Only if relevant, will be helpful for reproducing the issue
Jenkins Job configuration
Pipeline:
Inside file prAnalyze.groovy in jenkins_shared_library.git
Jenkins logs
the selected payload processor is: io.jenkins.plugins.bitbucketpushandpullrequest.processor.BitBucketPPRPullRequestPayloadProcessor@1a6b19ad dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe Considering remote [https://bitbucket.org/<TEAM>/<REPOSITORY>] dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe Considering candidate job analise-pull-request dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe Considering to poke analise-pull-request dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe Job is of type: hudson.model.Hudson dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe Scheduling for job:analise-pull-request dez 05, 2019 2:03:59 PM INFORMAÇÕES io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe lambda$matchGitScm$9 GIT BRANCHESdevelop dez 05, 2019 2:03:59 PM INFORMAÇÕES io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchGitScm GIT BRANCH VARIABLE GIT_BRANCH dez 05, 2019 2:03:59 PM INFORMAÇÕES io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchGitScm GIT LOCAL BRANCH VARIABLE GIT_LOCAL_BRANCH dez 05, 2019 2:03:59 PM INFORMAÇÕES io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe matchGitScm Trying to match https://bitbucket.org/<TEAM>/jenkins_shared_library.git<-->https://bitbucket.org/<TEAM>/<REPOSITORY dez 05, 2019 2:03:59 PM DETALHADO io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe analise-pull-request SCM doesnt match remote repo {1}
Beta Was this translation helpful? Give feedback.
All reactions