Bug 7702

Summary: Multibranch-git poller
Product: [Infrastructure] AutoBuilder Reporter: Tracy Graydon <tracy.graydon>
Component: autobuilderAssignee: Tracy Graydon <tracy.graydon>
Status: VERIFIED FIXED QA Contact: Mihail Stanciu <stanciux.mihail>
Severity: enhancement    
Priority: Medium+ CC: alexandru.c.georgescu, elizabeth.flanagan, infras.ab.watcher, Infras.watcher, sgw
Version: 1.9   
Target Milestone: 2.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Tracy Graydon 2015-04-30 19:22:33 UTC
If any branch in the repo changes we want to pull. This should already be supported
Comment 1 Tracy Graydon 2015-09-17 05:47:17 UTC
Submitted to mailing list for review. 


[YOCTO #7702]

This patchset provides an example buildset conf for a multi-
branch GitPoller, which may be found in the
build-config.examples directory. The README-NEW-AUTOBUILDER
file has also been updated with this example.

Signed-off-by: Graydon, Tracy <tracy.graydon@intel.com>
---
README-NEW-AUTOBUILDER                  | 43 ++++++++++++++++++++++++++++++++-
buildset-config.examples/gitpoller.conf | 33 +++++++++++++++++++++++++
2 files changed, 75 insertions(+), 1 deletion(-)
create mode 100644 buildset-config.examples/gitpoller.conf

diff --git a/README-NEW-AUTOBUILDER b/README-NEW-AUTOBUILDER
index d519b15..c37c8c4 100644
--- a/README-NEW-AUTOBUILDER
+++ b/README-NEW-AUTOBUILDER
@@ -249,7 +249,7 @@ scheduler: A list of dicts. Each item defines a scheduler associated with this
            If you are using a SingleBranchScheduler schedule, it is good
            practice to force a build to verify the buildset works correctly.
-Example:
+Example of PBChangeSource:
[nightly-x86]
builders: 'builder1'
@@ -276,6 +276,47 @@ scheduler: [{'dev-branch-scheduler' :
                  'stable-timer':30,
                  'change-password':'secret_change_password'}}]
+
+Example of MultiBranch GitPoller:
+
+[git-poller]
+builders: 'example-worker'
+repos: [{'poky-contrib':
+            {'repourl':'git://git.yoctoproject.org/poky-contrib',
+             'layerversion':{'core':'meta', 'yoctobsp':'meta-yocto-bsp'},
+             'branch':'tgraydon/poky'}},
+        {'meta-qt3':
+            {'repourl':'git://git.yoctoproject.org/poky-contrib',
+             'branch':'tgraydon/meta-qt3'}}]
+steps: [{'SetDest':{}},
+        {'CheckOutLayers': {}},
+        {'RunPreamble': {}},
+        {'GetDistroVersion' : {'distro': 'poky'}},
+        {'CreateAutoConf': {'machine': 'qemux86', 'SDKMACHINE' : 'i686',
+                            'distro': 'poky'}},
+        {'CreateBBLayersConf': {'buildprovider' : 'yocto'}},
+        {'BuildImages': {'images': 'core-image-sato'}},
+        {'PublishLayerTarballs':{}},
+        {'PublishArtifacts': {'artifacts': ['qemux86', 'atom-pc']}}]
+scheduler: [{'git-poller-scheduler':
+            {'type':'SingleBranchScheduler',
+             'changesource':'GitPoller',
+             'repository':'poky-contrib',
+             'branch':'tgraydon/poky',
+             'interval':3600},
+             'stable-timer':300}}]
+scheduler: [{'git-poller-scheduler':
+            {'type':'SingleBranchScheduler',
+             'changesource':'GitPoller',
+             'repository':'poky-contrib',
+             'branch':'tgraydon/meta-qt3',
+             'interval':3600},
+             'stable-timer':300}}]
+
+Note that the 'change-password' property is not used for GitPoller. This
+buildset config may also be found in the build-config.examples directory.
+
+
Adding Buildsteps
-------------
I've included the basic buildsteps required to do general building as well as an
diff --git a/buildset-config.examples/gitpoller.conf b/buildset-config.examples/gitpoller.conf
new file mode 100644
index 0000000..9bf5165
--- /dev/null
+++ b/buildset-config.examples/gitpoller.conf
@@ -0,0 +1,33 @@
+[git-poller]
+builders: 'example-worker'
+repos: [{'poky-contrib':
+            {'repourl':'git://git.yoctoproject.org/poky-contrib',
+             'layerversion':{'core':'meta', 'yoctobsp':'meta-yocto-bsp'},
+             'branch':'tgraydon/poky'}},
+        {'meta-qt3':
+            {'repourl':'git://git.yoctoproject.org/poky-contrib',
+             'branch':'tgraydon/meta-qt3'}}]
+steps: [{'SetDest':{}},
+        {'CheckOutLayers': {}},
+        {'RunPreamble': {}},
+        {'GetDistroVersion' : {'distro': 'poky'}},
+        {'CreateAutoConf': {'machine': 'qemux86', 'SDKMACHINE' : 'i686',
+                            'distro': 'poky'}},
+        {'CreateBBLayersConf': {'buildprovider' : 'yocto'}},
+        {'BuildImages': {'images': 'core-image-sato'}},
+        {'PublishLayerTarballs':{}},
+        {'PublishArtifacts': {'artifacts': ['qemux86', 'atom-pc']}}]
+scheduler: [{'git-poller-scheduler':
+            {'type':'SingleBranchScheduler',
+             'changesource':'GitPoller',
+             'repository':'poky-contrib',
+             'branch':'tgraydon/poky',
+             'interval':'3600,
+             'stable-timer':300}}]
+scheduler: [{'git-poller-scheduler':
+            {'type':'SingleBranchScheduler',
+             'changesource':'GitPoller',
+             'repository':'poky-contrib',
+             'branch':'tgraydon/meta-qt3',
+             'interval':'3600,
+             'stable-timer':300}}]
--
1.9.3
Comment 2 Tracy Graydon 2015-09-17 05:48:27 UTC
*** Bug 7686 has been marked as a duplicate of this bug. ***
Comment 3 Beth Flanagan 2015-10-15 18:19:32 UTC
Pulled into master.
Comment 4 Mihail Stanciu 2015-11-02 17:03:03 UTC
Verified README changes and example is present.