Merge ~kzapalowicz/snappy-hwe-snaps/+git/build-scripts:feature/snap-build-job-honores-default-arches into ~snappy-hwe-team/snappy-hwe-snaps/+git/build-scripts:master

Proposed by Konrad Zapałowicz
Status: Merged
Approved by: Simon Fels
Approved revision: 1025d0e9ec1fc82a8a96e53986c86cff48ab80ff
Merged at revision: 00a0c1788dbc670566b267c611dea6cf6be53587
Proposed branch: ~kzapalowicz/snappy-hwe-snaps/+git/build-scripts:feature/snap-build-job-honores-default-arches
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/build-scripts:master
Diff against target: 22 lines (+3/-1)
1 file modified
scripts/trigger-lp-build.py (+3/-1)
Reviewer Review Type Date Requested Status
Simon Fels Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+317763@code.launchpad.net

Commit message

scripts: fix build snap on unsupported arch

By default the snap has been build for all arches available, that is:
armhf, arm64, amd64 and i386. Not all snaps, however, are build for
all of those archs and in such situation the release job fails as a
whole.

This commit adds code to query the arches enabled by default for a
-publish job so that the snap is build only for those that are
supported.

Description of the change

scripts: fix build snap on unsupported arch

By default the snap has been build for all arches available, that is:
armhf, arm64, amd64 and i386. Not all snaps, however, are build for
all of those archs and in such situation the release job fails as a
whole.

This commit adds code to query the arches enabled by default for a
-publish job so that the snap is build only for those that are
supported.

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
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
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. Need to rework https://code.launchpad.net/~morphis/snappy-hwe-snaps/+git/build-scripts/+merge/317594 a bit when this is merged but that isn't a problem.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/trigger-lp-build.py b/scripts/trigger-lp-build.py
2index 842acd5..7f0f544 100755
3--- a/scripts/trigger-lp-build.py
4+++ b/scripts/trigger-lp-build.py
5@@ -21,7 +21,6 @@ parser.add_argument('-p', '--publish', action='store_true',
6
7 args = vars(parser.parse_args())
8
9-arches = ['amd64', 'i386', 'armhf', 'arm64']
10 series = 'xenial'
11
12 lp_app = se_utils.get_config_option("lp_app")
13@@ -49,6 +48,9 @@ print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
14 stamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
15 print("Trying to trigger builds at: {}".format(stamp))
16
17+# Not every snap is build agains all arches.
18+arches = [processor.name for processor in snap.processors]
19+
20 # We will now trigger a build for each whitelisted architecture, collect the
21 # build job url and the wait for all builds to finish and collect their results
22 # to vote for a successful or failed build.

Subscribers

People subscribed via source and target branches