← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] qa-jenkins-jobs:installer-ui-changes-alerts into qa-jenkins-jobs:master

 

Tim Andersson has proposed merging qa-jenkins-jobs:installer-ui-changes-alerts into qa-jenkins-jobs:master.

Requested reviews:
  Canonical Platform QA Team (canonical-platform-qa)

For more details, see:
https://code.launchpad.net/~canonical-platform-qa/qa-jenkins-jobs/+git/qa-jenkins-jobs/+merge/488694

New job to alert tim when desktop installer has ui changes impending
-- 
Your team Canonical Platform QA Team is requested to review the proposed merge of qa-jenkins-jobs:installer-ui-changes-alerts into qa-jenkins-jobs:master.
diff --git a/jobs/gui-testing-admin/jobs.yaml b/jobs/gui-testing-admin/jobs.yaml
new file mode 100644
index 0000000..aaba067
--- /dev/null
+++ b/jobs/gui-testing-admin/jobs.yaml
@@ -0,0 +1,60 @@
+---
+# vim: sw=4 ts=4 et
+
+# QA Jenkins Jobs
+# Copyright 2016 Canonical Ltd.
+
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 3, as published
+# by the Free Software Foundation.
+
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranties of
+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+# PURPOSE.  See the GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# The project stanza describes all jobs and parameters
+
+- job:
+    name: desktop-installer-ui-changes-prs
+    description: |
+        Polls the desktop installer frontend repository for pull requests with a
+        tag denoting UI changes.
+    triggers:
+        - timed: '@daily'
+    wrappers:
+        - timestamps
+        - timeout:
+            timeout: 10
+            fail: true
+    builders:
+        - clear-artifacts:
+        - shell: |
+            #!/bin/bash
+            tag_of_interest="affects-e2e-tests"
+            pull_requests=$(curl -q -L \
+              -H "Accept: application/vnd.github+json" \
+              -H "Authorization: Bearer $(cat ~/.secrets/github-pat/token)" \
+              -H "X-GitHub-Api-Version: 2022-11-28" \
+              https://api.github.com/repos/canonical/ubuntu-desktop-provision/pulls)
+            jq -c '.[]' <<< "${pull_requests}" | while read pr; do
+                if jq 'has("labels")' <<< "${pr}" &>/dev/null; then
+                    labels=$(jq '."labels"' <<< "${pr}" )
+                    jq -c '.[]' <<< "${labels}" | while read label; do
+                        if jq 'has("name")' <<< "${label}" &>/dev/null; then
+                            label_name=$(jq --raw-output '."name"' <<< "${label}")
+                            if [[ "${label_name}" == "${tag_of_interest}" ]]; then
+                                printf "There are outstanding PRs with the %s tag.\n" "${tag_of_interest}"
+                                exit 1
+                            fi
+                        fi
+                    done
+                fi
+            done
+            printf "No outstanding PRs with the %s tag. All is well.\n" "${tag_of_interest}"
+    publishers:
+      - email:
+          recipients: tim.andersson@xxxxxxxxxxxxx

Follow ups