-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If we use the snap process we can in theory test all the upgrades for a given PR. This should highlight any potential issues during an upgrade process.
- Loading branch information
1 parent
56b5f51
commit 0b3a1b3
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: "Upgrade" | ||
on: [push, pull_request] | ||
jobs: | ||
upgrade: | ||
name: linux-amd64 | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- name: Install Dependencies | ||
shell: bash | ||
run: | | ||
set -euxo pipefail | ||
sudo apt-get remove lxd lxd-client | ||
sudo snap install snapcraft --classic | ||
sudo snap install lxd | ||
sudo lxd waitready | ||
sudo lxd init --auto | ||
sudo chmod a+wr /var/snap/lxd/common/lxd/unix.socket | ||
echo "##[add-path]/snap/bin" | ||
- name: Bootstrap Juju latest/stable | ||
shell: bash | ||
run: | | ||
set -euxo pipefail | ||
lxc network set lxdbr0 ipv6.address none | ||
sudo snap install juju --classic | ||
juju bootstrap localhost | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build snap | ||
shell: bash | ||
run: | | ||
set -euxo pipefail | ||
snapcraft --use-lxd | ||
- name: Install snap | ||
shell: bash | ||
run: | | ||
set -euxo pipefail | ||
sudo snap install *.snap --dangerous --classic | ||
- name: Test upgrade | ||
shell: bash | ||
run: | | ||
set -euxo pipefail | ||
juju upgrade-controller |