jenkins.plone.org/virtualenv: [virtualenv] Convert package QA and pull request jobs

Gil Forcada <jenkins-z4DKO/[email protected]> Tue, 01 Aug 2017 15:52:59 -0700 (PDT)
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: jenkins.plone.org
Branch: refs/heads/virtualenv
Date: 2017-08-02T00:52:10+02:00
Author: Gil Forcada (gforcada) <[email protected]>
Commit: https://github.com/plone/jenkins.plone.org/commit/91897646275939f31bd8d64697fdb636e7ec44e0

[virtualenv] Convert package QA and pull request jobs

Files changed:
M jobs/jobs.yml
M jobs/scripts/pkg-qa.sh
M jobs/scripts/pr-tests.sh

diff --git a/jobs/jobs.yml b/jobs/jobs.yml
index bdf361d..eed876c 100644
--- a/jobs/jobs.yml
+++ b/jobs/jobs.yml
@@ -656,14 +656,33 @@
             branch: '{plone-version}'
 
     builders:
-        - python:
-            !include-raw-escape: scripts/pr-get-info.py
+        - shining-panda:
+            build-environment: virtualenv
+            python-version: System-CPython-2.7
+            name: pull_request
+            clear: true
+            nature: shell
+            command:
+                pip install pygithub==1.26.0
+
+        - shining-panda:
+            build-environment: virtualenv
+            python-version: System-CPython-2.7
+            name: pull_request
+            nature: python
+            command:
+                !include-raw-escape: scripts/pr-get-info.py
 
         - inject:
             properties-file: vars.properties
 
-        - shell:
-            !include-raw: scripts/pr-tests.sh
+        - shining-panda:
+            build-environment: virtualenv
+            python-version: System-CPython-2.7
+            name: pull_request
+            nature: shell
+            command:
+                !include-raw: scripts/pr-tests.sh
 
     publishers:
         - junit:
@@ -848,10 +867,30 @@
             wipe-workspace: false
 
     builders:
-        - shell:
-            !include-raw: scripts/pkg-qa.sh
-        - python:
-            !include-raw: scripts/pkg-qa-report.py
+        - shining-panda:
+            build-environment: virtualenv
+            python-version: System-CPython-2.7
+            name: package_qa
+            clear: true
+            nature: shell
+            command:
+                pip install pygithub==1.26.0
+
+        - shining-panda:
+            build-environment: virtualenv
+            python-version: System-CPython-2.7
+            name: package_qa
+            nature: shell
+            command:
+                !include-raw: scripts/pkg-qa.sh
+
+        - shining-panda:
+            build-environment: virtualenv
+            python-version: System-CPython-2.7
+            name: package_qa
+            nature: python
+            command:
+                !include-raw: scripts/pkg-qa-report.py
 
     publishers:
         - violations:
diff --git a/jobs/scripts/pkg-qa.sh b/jobs/scripts/pkg-qa.sh
index 5eec801..d75d136 100644
--- a/jobs/scripts/pkg-qa.sh
+++ b/jobs/scripts/pkg-qa.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
-wget https://raw.githubusercontent.com/plone/buildout.coredev/5.1/bootstrap.py -O bootstrap.py
+wget https://raw.githubusercontent.com/plone/buildout.coredev/5.1/requirements.txt -O requirements.txt
 wget https://raw.githubusercontent.com/plone/buildout.coredev/5.1/experimental/qa.cfg -O qa.cfg
 wget https://raw.githubusercontent.com/plone/plone.recipe.codeanalysis/master/.isort.cfg -O .isort.cfg
 sed -i 's#directory = src#directory = {top-level}#' qa.cfg
-$PYTHON27 bootstrap.py --setuptools-version 33.1.1 --buildout-version 2.8.0 -c qa.cfg
-bin/buildout -c qa.cfg
+pip install -r requirements.txt
+buildout -c qa.cfg
 bin/code-analysis
diff --git a/jobs/scripts/pr-tests.sh b/jobs/scripts/pr-tests.sh
index 0ee1716..ce878df 100644
--- a/jobs/scripts/pr-tests.sh
+++ b/jobs/scripts/pr-tests.sh
@@ -1,15 +1,18 @@
 #!/bin/bash
+BUILDOUT="bin/buildout"
+
 if [ "{plone-version}" = "4.3" ]; then
     $PYTHON27 bootstrap.py -c jenkins.cfg
 else
-    $PYTHON27 bootstrap.py --setuptools-version 33.1.1 --buildout-version 2.8.0 -c jenkins.cfg
+    pip install -r requirements.txt
+    BUILDOUT="buildout"
 fi
 if [ "$COREDEV" = "1" ]; then
     # TODO(gforcada): allow to test remote branches (i.e. branches not in github.com/plone/buildout.coredev)
     git checkout $BRANCH
 fi
 
-bin/buildout -c jenkins.cfg
+${{BUILDOUT}} -c jenkins.cfg
 
 return_code="all_right"
 



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot