Merge qa-jenkins-jobs:upgrade-eol-releases into qa-jenkins-jobs:master

Proposed by Paride Legovini
Status: Merged
Merged at revision: 5695839186c9c6638de95ff1b15e20abd771c932
Proposed branch: qa-jenkins-jobs:upgrade-eol-releases
Merge into: qa-jenkins-jobs:master
Diff against target: 26 lines (+11/-1)
1 file modified
jobs/auto-upgrade-testing/jobs.yaml (+11/-1)
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+426195@code.launchpad.net

Commit message

upgrade tests: support EOL releases

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) :
review: Approve
Revision history for this message
Brian Murray (brian-murray) wrote :

This looks good to me, thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/auto-upgrade-testing/jobs.yaml b/jobs/auto-upgrade-testing/jobs.yaml
2index 998dc33..44bbf10 100755
3--- a/jobs/auto-upgrade-testing/jobs.yaml
4+++ b/jobs/auto-upgrade-testing/jobs.yaml
5@@ -62,10 +62,20 @@
6 }}
7 EOF
8
9+ # Handle EOL releases
10+ RELEASE_FROM=${{RELEASE%%-*}}
11+ if ! {{ ubuntu-distro-info --supported ; ubuntu-distro-info --supported-esm ; }} | grep -q "$RELEASE_FROM"; then
12+ echo "deb http://old-releases.ubuntu.com/ubuntu ${{RELEASE_FROM}} main universe restricted multiverse" > old-releases-sources.list
13+ echo "deb http://old-releases.ubuntu.com/ubuntu ${{RELEASE_FROM}}-updates main universe restricted multiverse" >> old-releases-sources.list
14+ echo "deb http://old-releases.ubuntu.com/ubuntu ${{RELEASE_FROM}}-security main universe restricted multiverse" >> old-releases-sources.list
15+ AUTOPKGTEST_APT_SOURCES_FILE=$(realpath old-releases-sources.list)
16+ export AUTOPKGTEST_APT_SOURCES_FILE
17+ fi
18+
19 cd auto-upgrade-testing
20
21 set +e
22- sudo python3 -m upgrade_testing.command_line -c $PROFILE --provision --results-dir "$WORKSPACE/{profile}/"
23+ sudo --preserve-env=AUTOPKGTEST_APT_SOURCES_FILE python3 -m upgrade_testing.command_line -c $PROFILE --provision --results-dir "$WORKSPACE/{profile}/"
24 EXITSTATUS=$?
25 sudo chown -R $USER:$USER "$WORKSPACE"
26 cp $WORKSPACE/{profile}/*/artifacts/upgrade_run/junit.xml $WORKSPACE/junit.xml

Subscribers

People subscribed via source and target branches

to all changes: