Bug 1390288 - allow configuration of more than one namespace to sync
Summary: allow configuration of more than one namespace to sync
Alias: None
Product: OKD
Classification: Red Hat
Component: Build
Version: 3.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Ben Parees
QA Contact: Dongbo Yan
: 1390294 1391209 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2016-10-31 15:50 UTC by Ben Parees
Modified: 2017-11-10 21:34 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2017-11-10 21:34:38 UTC

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Github https://github.com/fabric8io openshift-jenkins-sync-plugin issues 63 None None None 2016-10-31 15:50 UTC

Description Ben Parees 2016-10-31 15:50:40 UTC
Currently only a single namespace can be specified for the sync plugin to synchronize against.  It should be possible to specify any number of namespaces (comma or space separated) and they should all be synced (assuming the jenkins service account has appropriate permissions to access/edit all the namespaces).

This is a tracker bug for https://github.com/fabric8io/openshift-jenkins-sync-plugin/issues/63

Comment 1 Ben Parees 2016-11-16 20:38:34 UTC
*** Bug 1391209 has been marked as a duplicate of this bug. ***

Comment 2 Ben Parees 2016-11-16 20:43:45 UTC
*** Bug 1390294 has been marked as a duplicate of this bug. ***

Comment 3 Ben Parees 2017-02-03 14:56:40 UTC
This is more of a feature than a bug and too risky to include in 3.5 at this point, so moving to upcoming release.

in progress PR is here:

Comment 4 Ben Parees 2017-03-09 12:52:38 UTC
PR has been merged and included in the jenkins centos image, but we haven't put it into the rhel image yet.  Will update this bug when we do.

Comment 6 Dongbo Yan 2017-04-18 08:46:38 UTC
Test with brew-pulp.../openshift3/jenkins-2-rhel7@sha256:19cbf5987b692ea7bea9be30c7e6ad4a149f77a063c563e746ff0f31e9a6bc53

openshift-login	0.12
openshift-pipeline 1.0.42
openshift-sync	0.1.12

1.$ oc policy add-role-to-user admin system:serviceaccount:dyantest:jenkins -n dyan2
1.Go to "Manage Jenkins" -> "Configure System" -> "OpenShift Jenkins Sync", input namespace name which want to sync in "Namespace" box.

Actual result: could see pipeline build from other namespace sync into jenkins

But there is an issue, if I start a new pipeline build, it will execute action defined in pipeline build twice. 
For example:
I use https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.yaml to create pipeline build, if I execute
$ oc start-build sample-pipeline , then the build "sample-pipeline-2" will trigger "nodejs-mongodb-example-2" and "nodejs-mongodb-example-3"
# oc get build -n dyan2
NAME                       TYPE              FROM          STATUS     STARTED          DURATION
nodejs-mongodb-example-1   Source            Git@e81cacf   Complete   5 hours ago      38s
nodejs-mongodb-example-2   Source            Git@e81cacf   Complete   21 minutes ago   18s
nodejs-mongodb-example-3   Source            Git@e81cacf   Complete   21 minutes ago   17s
sample-pipeline-1          JenkinsPipeline                 Complete   5 hours ago      
sample-pipeline-2          JenkinsPipeline                 Complete   21 minutes ago

so is it normal, should I file a bug for it

Comment 7 Dongbo Yan 2017-04-18 09:42:33 UTC
have reported this https://bugzilla.redhat.com/show_bug.cgi?id=1443009

Note You need to log in before you can comment on or make changes to this bug.