Skip to content

Commit

Permalink
Change built image name to jammy (#179)
Browse files Browse the repository at this point in the history
* Change built image name to jammy

* Check for the jammy label in e2e test
  • Loading branch information
yhaliaw authored Jan 3, 2024
1 parent 9f9bca8 commit 8e3799a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ jobs:
e2e-test:
name: End-to-End Test
needs: [build-charm, run-id]
runs-on: [self-hosted, linux, x64, "pr-${{ needs.run-id.outputs.run-id }}"]
runs-on: [self-hosted, linux, x64, jammy, "pr-${{ needs.run-id.outputs.run-id }}"]
steps:
# Snapd can have some issues in privileged LXD containers without setting
# security.nesting=True and this.
Expand Down
6 changes: 3 additions & 3 deletions scripts/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ fi
/snap/bin/lxc publish builder --alias builder --reuse -f

# Swap in the built image
/snap/bin/lxc image alias rename runner old-runner || true
/snap/bin/lxc image alias rename builder runner
/snap/bin/lxc image delete old-runner || true
/snap/bin/lxc image alias rename jammy old-jammy || true
/snap/bin/lxc image alias rename builder jammy
/snap/bin/lxc image delete old-jammy || true

# Clean up LXD instance
cleanup '/snap/bin/lxc info builder &> /dev/null' '/snap/bin/lxc delete builder --force' 'Cleanup LXD instance' 10
2 changes: 1 addition & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _get_runner_manager(
RunnerManagerConfig(
path=path,
token=token,
image="runner",
image="jammy",
service_token=self.service_token,
lxd_storage_path=self.ram_pool_path,
charm_state=self._state,
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_org_register(self, run, wt, mkdir, rm):
RunnerManagerConfig(
path=GithubOrg(org="mockorg", group="mockgroup"),
token="mocktoken",
image="runner",
image="jammy",
service_token=token,
lxd_storage_path=GithubRunnerCharm.ram_pool_path,
charm_state=harness.charm._state,
Expand All @@ -146,7 +146,7 @@ def test_repo_register(self, run, wt, mkdir, rm):
RunnerManagerConfig(
path=GithubRepo(owner="mockorg", repo="repo"),
token="mocktoken",
image="runner",
image="jammy",
service_token=token,
lxd_storage_path=GithubRunnerCharm.ram_pool_path,
charm_state=harness.charm._state,
Expand Down Expand Up @@ -177,7 +177,7 @@ def test_update_config(self, run, wt, mkdir, rm):
RunnerManagerConfig(
path=GithubRepo(owner="mockorg", repo="repo"),
token="mocktoken",
image="runner",
image="jammy",
service_token=token,
lxd_storage_path=GithubRunnerCharm.ram_pool_path,
charm_state=harness.charm._state,
Expand All @@ -197,7 +197,7 @@ def test_update_config(self, run, wt, mkdir, rm):
RunnerManagerConfig(
path=GithubRepo(owner="mockorg", repo="repo"),
token="mocktoken",
image="runner",
image="jammy",
service_token=token,
lxd_storage_path=GithubRunnerCharm.ram_pool_path,
charm_state=harness.charm._state,
Expand Down

0 comments on commit 8e3799a

Please sign in to comment.