jenkins-bot has submitted this change and it was merged.

Change subject: Use templates for all Wikidata jobs
......................................................................


Use templates for all Wikidata jobs

Some jobs require tests with specific tags to be executed.
For this to work I needed to introduce another parameter to
specify custom tags. Called it cucumber_tags. If it is not set
everything behaves as before. If it is set, only tests with the
specified tags will be executed.

Change-Id: I7d7e528024c849b939cb5b00a2d522ec39d50ff1
---
M browsertests.yaml
M job-templates-browsertests.yaml
M macro.yaml
3 files changed, 25 insertions(+), 3 deletions(-)

Approvals:
  Hashar: Looks good to me, but someone else must approve
  Zfilipin: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/browsertests.yaml b/browsertests.yaml
index e3139ed..d3bd8d4 100644
--- a/browsertests.yaml
+++ b/browsertests.yaml
@@ -30,7 +30,10 @@
         [email protected] [email protected] 
[email protected]
 
      - Wikidata: &emails-Wikidata-qa
-        [email protected] [email protected] 
[email protected]
+        [email protected] [email protected]
+
+     - Wikidata-devs: &emails-Wikidata-devs
+        [email protected] [email protected] 
[email protected] [email protected]
 
 # CirrusSearch
 - project:
@@ -528,7 +531,17 @@
     repository_host: github.com/wmde
 
     jobs:
-      - 
'browsertests-Wikidata-{name}-{mediawiki_url}-{platform}-{browser}-sauce'
+      - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce'
+
+      - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce':
+         name: PerformanceTests
+         cucumber_tags: '@performance_testing'
+         recipients: *emails-Wikidata-devs
+
+      - 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce':
+         name: SmokeTests
+         cucumber_tags: '@smoke'
+         recipients: *emails-Wikidata-devs
 
 # WikiLove
 - project:
diff --git a/job-templates-browsertests.yaml b/job-templates-browsertests.yaml
index 2da78b1..d2ab5a1 100644
--- a/job-templates-browsertests.yaml
+++ b/job-templates-browsertests.yaml
@@ -29,6 +29,7 @@
       - shell: mkdir -p "$WORKSPACE/log/junit"
       - browsertest-website-version:
           browser: '{browser}'
+          cucumber_tags: '{cucumber_tags}'
           headless: '{headless}'
           folder: '{folder}'
           mediawiki_password_variable: '{mediawiki_password_variable}'
@@ -68,7 +69,7 @@
          - lang_list
 
 - job-template:
-    name: 
'browsertests-Wikidata-{name}-{mediawiki_url}-{platform}-{browser}-sauce'
+    name: 'browsertests-Wikidata-{name}-{platform}-{browser}-sauce'
     defaults: browsertests
 
     triggers:
@@ -78,6 +79,7 @@
     name: browsertests
     node: contintLabsSlave && UbuntuPrecise
     repository_host: 'gerrit.wikimedia.org/r'
+    cucumber_tags: ''
 
     properties:
      - throttle:
@@ -104,6 +106,7 @@
       - shell: mkdir -p "$WORKSPACE/log/junit"
       - browsertest-website:
           browser: '{browser}'
+          cucumber_tags: '{cucumber_tags}'
           headless: '{headless}'
           folder: '{folder}'
           mediawiki_password_variable: '{mediawiki_password_variable}'
diff --git a/macro.yaml b/macro.yaml
index 2c238d3..d7b6845 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -659,6 +659,7 @@
       - shell: |
           # set up environment variables
           export BROWSER={browser}
+          export CUCUMBER_TAGS={cucumber_tags}
           export HEADLESS={headless}
           export MEDIAWIKI_API_URL=http://{mediawiki_url}/w/api.php
           export MEDIAWIKI_PASSWORD_VARIABLE={mediawiki_password_variable}
@@ -738,6 +739,8 @@
             export LANGUAGE_SCREENSHOT_PATH="$WORKSPACE/log"
           elif [[ $JOB_NAME == browsertests-Core-* ]]; then
             CUCUMBER_PARAMETER="@clean"
+          elif [[ ! -z $CUCUMBER_TAGS ]]; then
+            CUCUMBER_PARAMETER="$CUCUMBER_TAGS"
           else
             CUCUMBER_PARAMETER="@{mediawiki_url}"
           fi
@@ -775,6 +778,7 @@
       - shell: |
           # set up environment variables
           export BROWSER={browser}
+          export CUCUMBER_TAGS={cucumber_tags}
           export HEADLESS={headless}
           export MEDIAWIKI_API_URL=http://{mediawiki_url}/w/api.php
           export MEDIAWIKI_PASSWORD_VARIABLE={mediawiki_password_variable}
@@ -852,6 +856,8 @@
           if [[ ! -z $LANGUAGE_SCREENSHOT_CODE ]]; then
             CUCUMBER_PARAMETER="@language_screenshot"
             export LANGUAGE_SCREENSHOT_PATH="$WORKSPACE/log"
+          elif [[ ! -z $CUCUMBER_TAGS ]]; then
+            CUCUMBER_PARAMETER="$CUCUMBER_TAGS"
           else
             CUCUMBER_PARAMETER="@{mediawiki_url}"
           fi

-- 
To view, visit https://gerrit.wikimedia.org/r/165461
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d7e528024c849b939cb5b00a2d522ec39d50ff1
Gerrit-PatchSet: 7
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: Zfilipin <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to