From 0ce9819fd98f83276a45469e657ec2a951d38358 Mon Sep 17 00:00:00 2001 From: Yanks Yoon Date: Wed, 13 Nov 2024 09:25:32 +0000 Subject: [PATCH 1/9] chore: update jre version --- jenkins_agent_k8s_rock/rockcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins_agent_k8s_rock/rockcraft.yaml b/jenkins_agent_k8s_rock/rockcraft.yaml index e09892f..fc467b9 100644 --- a/jenkins_agent_k8s_rock/rockcraft.yaml +++ b/jenkins_agent_k8s_rock/rockcraft.yaml @@ -19,7 +19,7 @@ parts: overlay-packages: - bash - ca-certificates-java - - default-jre-headless + - openjdk-21-jre-headless - git - sudo override-prime: | From 063e740b1a01e486125e62187d63310a4b5b142d Mon Sep 17 00:00:00 2001 From: Yanks Yoon Date: Wed, 13 Nov 2024 10:47:25 +0000 Subject: [PATCH 2/9] test: use juju 3.56 --- .github/workflows/integration_test.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index b6e1f3e..ae5a14c 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -15,3 +15,7 @@ jobs: extra-arguments: | --kube-config=${GITHUB_WORKSPACE}/kube-config modules: '["test_agent_k8s.py"]' + juju-channel: 3.1/stable + self-hosted-runner: true + self-hosted-runner-label: "xlarge" + microk8s-addons: "dns ingress rbac storage metallb:10.15.119.2-10.15.119.4 registry" From 444d1f888bc87cc2eda0ccb1813a6631039e632a Mon Sep 17 00:00:00 2001 From: Yanks Yoon Date: Sun, 17 Nov 2024 10:27:46 +0000 Subject: [PATCH 3/9] update to use juju 3.5 (real commit) --- .github/workflows/integration_test.yaml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index ae5a14c..0b21692 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -15,7 +15,7 @@ jobs: extra-arguments: | --kube-config=${GITHUB_WORKSPACE}/kube-config modules: '["test_agent_k8s.py"]' - juju-channel: 3.1/stable + juju-channel: 3.5/stable self-hosted-runner: true self-hosted-runner-label: "xlarge" microk8s-addons: "dns ingress rbac storage metallb:10.15.119.2-10.15.119.4 registry" diff --git a/tox.ini b/tox.ini index 7922495..4887bc7 100644 --- a/tox.ini +++ b/tox.ini @@ -105,7 +105,7 @@ commands = description = Run integration tests deps = pytest - juju==3.0.4 + juju>=3,<4 ops pytest-operator pytest-asyncio From c15ecc03422b4b06ed26a2bccb38c9833b6d9905 Mon Sep 17 00:00:00 2001 From: Yanks Yoon Date: Sun, 17 Nov 2024 10:54:21 +0000 Subject: [PATCH 4/9] microk8s strict channel --- .github/workflows/integration_test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index 0b21692..ec243f5 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -16,6 +16,7 @@ jobs: --kube-config=${GITHUB_WORKSPACE}/kube-config modules: '["test_agent_k8s.py"]' juju-channel: 3.5/stable + channel: 1.31-strict/stable self-hosted-runner: true self-hosted-runner-label: "xlarge" microk8s-addons: "dns ingress rbac storage metallb:10.15.119.2-10.15.119.4 registry" From 86d1b65327df300e8548245059ef787831ebedb5 Mon Sep 17 00:00:00 2001 From: Yanks Yoon Date: Mon, 18 Nov 2024 08:39:31 +0000 Subject: [PATCH 5/9] chore: use latest rockcraft syntax --- jenkins_agent_k8s_rock/rockcraft.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins_agent_k8s_rock/rockcraft.yaml b/jenkins_agent_k8s_rock/rockcraft.yaml index fc467b9..cd42e4a 100644 --- a/jenkins_agent_k8s_rock/rockcraft.yaml +++ b/jenkins_agent_k8s_rock/rockcraft.yaml @@ -5,8 +5,8 @@ name: jenkins-agent-k8s summary: Jenkins-agent-k8s rock description: Jenkins-agent-k8s OCI image for the Jenkins-agent-k8s charm version: "1.1" -base: ubuntu:22.04 -build-base: ubuntu:22.04 +base: ubuntu@22.04 +build-base: ubuntu@22.04 license: Apache-2.0 platforms: amd64: From 29c9370b26603b41b532de289400e74cb3b974b3 Mon Sep 17 00:00:00 2001 From: Yanks Yoon Date: Mon, 18 Nov 2024 09:19:48 +0000 Subject: [PATCH 6/9] chore: increase idle period --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index f632d12..51fd52c 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -172,7 +172,7 @@ async def machine_jenkins_client_fixture( async def jenkins_k8s_server_fixture(model: Model) -> Application: """The jenkins k8s server.""" app = await model.deploy("jenkins-k8s", series="jammy", channel="latest/edge") - await model.wait_for_idle(apps=[app.name], timeout=1200, raise_on_error=False) + await model.wait_for_idle(apps=[app.name], timeout=1200, raise_on_error=False, idle_period=30) return app From 9a519ce8e9728ccea7f5b54eeda90179f6bbd374 Mon Sep 17 00:00:00 2001 From: Yanks Yoon Date: Tue, 19 Nov 2024 00:39:34 +0000 Subject: [PATCH 7/9] test: use testing Jenkins version --- tests/integration/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 51fd52c..69b6f05 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -171,7 +171,9 @@ async def machine_jenkins_client_fixture( @pytest_asyncio.fixture(scope="module", name="jenkins_k8s_server") async def jenkins_k8s_server_fixture(model: Model) -> Application: """The jenkins k8s server.""" - app = await model.deploy("jenkins-k8s", series="jammy", channel="latest/edge") + # A custom JRE/Jenkins LTS upgraded version of Jenkins has been manually pushed to test/edge + # channel for testing. There's a deadlock on the dependency in testing. + app = await model.deploy("jenkins-k8s", series="jammy", channel="test/edge") await model.wait_for_idle(apps=[app.name], timeout=1200, raise_on_error=False, idle_period=30) return app From 489bba153defad56ad562eb70face132d8008562 Mon Sep 17 00:00:00 2001 From: Yanks Yoon Date: Tue, 19 Nov 2024 01:11:56 +0000 Subject: [PATCH 8/9] test: define base and channel w/ branch --- tests/integration/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 69b6f05..77ca050 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -173,7 +173,9 @@ async def jenkins_k8s_server_fixture(model: Model) -> Application: """The jenkins k8s server.""" # A custom JRE/Jenkins LTS upgraded version of Jenkins has been manually pushed to test/edge # channel for testing. There's a deadlock on the dependency in testing. - app = await model.deploy("jenkins-k8s", series="jammy", channel="test/edge") + app = await model.deploy( + "jenkins-k8s", series="jammy", channel="latest/edge/test", base="ubuntu@22.04" + ) await model.wait_for_idle(apps=[app.name], timeout=1200, raise_on_error=False, idle_period=30) return app From 029d3124f75db83e3e5b533f9247b2aaff60091b Mon Sep 17 00:00:00 2001 From: Yanks Yoon Date: Tue, 19 Nov 2024 01:27:54 +0000 Subject: [PATCH 9/9] test: use working branch track --- tests/integration/conftest.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 77ca050..214b63b 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -171,10 +171,11 @@ async def machine_jenkins_client_fixture( @pytest_asyncio.fixture(scope="module", name="jenkins_k8s_server") async def jenkins_k8s_server_fixture(model: Model) -> Application: """The jenkins k8s server.""" - # A custom JRE/Jenkins LTS upgraded version of Jenkins has been manually pushed to test/edge - # channel for testing. There's a deadlock on the dependency in testing. + # A custom JRE/Jenkins LTS upgraded version of Jenkins has been manually pushed to latest/edge + # channel revision 128 for testing. There's a deadlock on the dependency in testing + # jenkins-agent-k8s and jenkins-k8s. app = await model.deploy( - "jenkins-k8s", series="jammy", channel="latest/edge/test", base="ubuntu@22.04" + "jenkins-k8s", series="jammy", channel="latest/edge", base="ubuntu@22.04", revision=128 ) await model.wait_for_idle(apps=[app.name], timeout=1200, raise_on_error=False, idle_period=30)