Merge ~jhodapp/snappy-hwe-snaps/+git/build-scripts:check-candidate-channel into ~snappy-hwe-team/snappy-hwe-snaps/+git/build-scripts:master

Proposed by Jim Hodapp
Status: Merged
Approved by: Simon Fels
Approved revision: 17950555c92bcd12d020e961738c171657084a0f
Merged at revision: 114e4bf8a15ffbaf9f8a46ff296e30747ebb0106
Proposed branch: ~jhodapp/snappy-hwe-snaps/+git/build-scripts:check-candidate-channel
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/build-scripts:master
Diff against target: 28 lines (+5/-5)
1 file modified
jobs/send-mail-notification-snap (+5/-5)
Reviewer Review Type Date Requested Status
Simon Fels Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+318020@code.launchpad.net

Description of the change

Make sure to only compare revisions for new snap packages in the candidate channel.

This will no longer send an email when a snap is released to stable but instead to candidate.

There's also no reason to have debugging turned on for this script which should make the output log much more readable.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/send-mail-notification-snap b/jobs/send-mail-notification-snap
2index 358c41c..0f0cb70 100644
3--- a/jobs/send-mail-notification-snap
4+++ b/jobs/send-mail-notification-snap
5@@ -14,7 +14,6 @@
6 # You should have received a copy of the GNU General Public License
7 # along with this program. If not, see <http://www.gnu.org/licenses/>.
8
9-set -x
10 set -e
11
12 export http_proxy=http://squid.internal:3128/ && export https_proxy=https://squid.internal:3128/
13@@ -29,10 +28,11 @@ do
14 echo $pkg
15
16 # Get the snap package's current revision number, version and last_updated fields
17- SNAP_REVISION=$(curl -s -H "X-Ubuntu-Series: $UBUNTU_SERIES" -H 'Accept: application/hal+json' "https://search.apps.ubuntu.com/api/v1/snaps/details/$SNAP_PACKAGE_NAME?fields=revision" | jq '.revision')
18- SNAP_VERSION=$(curl -s -H "X-Ubuntu-Series: $UBUNTU_SERIES" -H 'Accept: application/hal+json' "https://search.apps.ubuntu.com/api/v1/snaps/details/$SNAP_PACKAGE_NAME?fields=version" | jq '.version')
19- SNAP_LAST_UPDATED=$(curl -s -H "X-Ubuntu-Series: $UBUNTU_SERIES" -H 'Accept: application/hal+json' "https://search.apps.ubuntu.com/api/v1/snaps/details/$SNAP_PACKAGE_NAME?fields=last_updated" | jq '.last_updated')
20- SNAP_ARCH=$(curl -s -H "X-Ubuntu-Series: $UBUNTU_SERIES" -H 'Accept: application/hal+json' "https://search.apps.ubuntu.com/api/v1/snaps/details/$SNAP_PACKAGE_NAME?fields=architecture" | jq '.architecture')
21+ # See REST API for more details: https://search.apps.ubuntu.com/docs/
22+ SNAP_REVISION=$(curl -s -H "X-Ubuntu-Series: $UBUNTU_SERIES" -H "X-Ubuntu-Device-Channel: $CHANNEL" -H 'Accept: application/hal+json' "https://search.apps.ubuntu.com/api/v1/snaps/details/$SNAP_PACKAGE_NAME?fields=revision" | jq '.revision')
23+ SNAP_VERSION=$(curl -s -H "X-Ubuntu-Series: $UBUNTU_SERIES" -H "X-Ubuntu-Device-Channel: $CHANNEL" -H 'Accept: application/hal+json' "https://search.apps.ubuntu.com/api/v1/snaps/details/$SNAP_PACKAGE_NAME?fields=version" | jq '.version')
24+ SNAP_LAST_UPDATED=$(curl -s -H "X-Ubuntu-Series: $UBUNTU_SERIES" -H "X-Ubuntu-Device-Channel: $CHANNEL" -H 'Accept: application/hal+json' "https://search.apps.ubuntu.com/api/v1/snaps/details/$SNAP_PACKAGE_NAME?fields=last_updated" | jq '.last_updated')
25+ SNAP_ARCH=$(curl -s -H "X-Ubuntu-Series: $UBUNTU_SERIES" -H "X-Ubuntu-Device-Channel: $CHANNEL" -H 'Accept: application/hal+json' "https://search.apps.ubuntu.com/api/v1/snaps/details/$SNAP_PACKAGE_NAME?fields=architecture" | jq '.architecture')
26 if [ ! -e "$WORKSPACE/$SNAP_PACKAGE_NAME.revision" ]; then
27 STORED_SNAP_REVISION=0
28 else

Subscribers

People subscribed via source and target branches

to all changes: