Merge lp:~roadmr/ols-jenkaas/is-snapcraft-ci-macaroon-stale into lp:~ols-jenkaas-admins/ols-jenkaas/trunk

Proposed by Daniel Manrique
Status: Merged
Merged at revision: 796
Proposed branch: lp:~roadmr/ols-jenkaas/is-snapcraft-ci-macaroon-stale
Merge into: lp:~ols-jenkaas-admins/ols-jenkaas/trunk
Diff against target: 11 lines (+1/-1)
1 file modified
jobs/snapcraft-ci.yaml (+1/-1)
To merge this branch: bzr merge lp:~roadmr/ols-jenkaas/is-snapcraft-ci-macaroon-stale
Reviewer Review Type Date Requested Status
Maximiliano Bertacchini Approve
Online Services Jenkaas Administrators Pending
Review via email: mp+409864@code.launchpad.net

Commit message

Message and failfast if the candid macaroon for snapcraft-ci is stale.

Description of the change

This should prevent headscratching when snapcraft-ci fails.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

The addition is this oneliner:

if [ "$(find ~/secrets/snapcraft-ci/store-testing-creds.dat -ctime -29)" = "" ]; then echo "Candid macaroon is older than 29 days, failing fast. Generate a new macaroon with ols-jenkaas-secrets"; exit 1; else echo "Candid macaroon is fresh enough, continuing";fi

Revision history for this message
Maximiliano Bertacchini (maxiberta) wrote :

LGTM +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jobs/snapcraft-ci.yaml'
2--- jobs/snapcraft-ci.yaml 2021-03-29 16:06:15 +0000
3+++ jobs/snapcraft-ci.yaml 2021-10-07 20:02:34 +0000
4@@ -4,7 +4,7 @@
5 vcs: 'git'
6 trunk: 'https://github.com/snapcore/snapcraft.git'
7 setup: 'git clone lp:~roadmr/+git/spread'
8- acceptance-tests: 'SNAP_STORE_MACAROON=$(base64 -w0 ~/secrets/snapcraft-ci/store-testing-creds.dat) SNAP_STORE_CANDID_MACAROON=$(base64 -w0 ~/secrets/snapcraft-ci/store-testing-candid-creds.dat) SNAPCRAFT_CHANNEL=candidate spread/spread lxd:ubuntu-18.04:tests/spread/general/store'
9+ acceptance-tests: 'if [ "$(find ~/secrets/snapcraft-ci/store-testing-creds.dat -ctime -29)" = "" ]; then echo "Candid macaroon is older than 29 days, failing fast. Generate a new macaroon with ols-jenkaas-secrets"; exit 1; else echo "Candid macaroon is fresh enough, continuing";fi;SNAP_STORE_MACAROON=$(base64 -w0 ~/secrets/snapcraft-ci/store-testing-creds.dat) SNAP_STORE_CANDID_MACAROON=$(base64 -w0 ~/secrets/snapcraft-ci/store-testing-candid-creds.dat) SNAPCRAFT_CHANNEL=candidate spread/spread lxd:ubuntu-18.04:tests/spread/general/store'
10 jobs:
11 - '{name}-tests'
12

Subscribers

People subscribed via source and target branches