Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the issue of duplicate pipeline #239

Merged

Conversation

gabemontero
Copy link

Right now, when the buildconfig name is different then git repo name
then sync plugin is not able to find buildconfig by repo name while
syncing back to openshift after creating a buildconfig with strategy
JenkinsPipeline, and create a new buildconfig repo name, To fix this
issue, added a label of gitRepository name so it will first try to
find the BuildConfig with name of jenkins job, if that is not present
that is our case then it will also try to find the buildconfig having
label with the name of jenkins job and then if it is not present will
create a new BuildConfig #27

Declared constant variable for label key

Removed NPE and added comments in the code to always know the context behind this

cherry-pick of fabric8io#28 , as well as some space/tab issues

@openshift/sig-developer-experience @piyush1594 fyi/ptal

Right now, when the buildconfig name is different then git repo name
then sync plugin is not able to find buildconfig by repo name while
syncing back to openshift after creating a buildconfig with strategy
JenkinsPipeline, and create a new buildconfig repo name, To fix this
issue, added a label of gitRepository name so it will first try to
find the BuildConfig with name of jenkins job, if that is not present
that is our case then it will also try to find the buildconfig having
label with the name of jenkins job and then if it is not present will
create a new BuildConfig openshift#27

Declared constant variable for label key

Removed NPE and added comments in the code to always know the context behind this
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 21, 2018
@gabemontero gabemontero added the lgtm Indicates that a PR is ready to be merged. label May 24, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gabemontero

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift openshift deleted a comment from openshift-ci-robot May 24, 2018
@openshift-ci-robot
Copy link

@gabemontero: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins a68575d link /test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@gabemontero gabemontero merged commit 2a611b2 into openshift:master May 24, 2018
@gabemontero gabemontero deleted the fabric-duplicate-pipeline-fix branch May 24, 2018 17:51
akram pushed a commit to akram/jenkins-sync-plugin that referenced this pull request Aug 1, 2019
* Fixed the issue of duplicate pipeline

Right now, when the buildconfig name is different then git repo name
then sync plugin is not able to find buildconfig by repo name while
syncing back to openshift after creating a buildconfig with strategy
JenkinsPipeline, and create a new buildconfig repo name, To fix this
issue, added a label of gitRepository name so it will first try to
find the BuildConfig with name of jenkins job, if that is not present
that is our case then it will also try to find the buildconfig having
label with the name of jenkins job and then if it is not present will
create a new BuildConfig #27

Declared constant variable for label key

Removed NPE and added comments in the code to always know the context behind this

* Updated wrong logging in #28 PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants