From fe8e42c842b02f0372e4c387cc5d2259ba04789f Mon Sep 17 00:00:00 2001 From: DeeKay3 Date: Thu, 10 Jul 2025 15:21:49 +0100 Subject: [PATCH 1/5] docs/ISD-3479: Fixing vale errors --- .custom_wordlist.txt | 6 ++++++ .github/pull_request_template.md | 6 +++--- README.md | 2 +- docs/explanation/charm-architecture.md | 14 +++++++------- docs/how-to/contribute.md | 3 +-- docs/index.md | 2 +- docs/reference/integrations.md | 3 ++- 7 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 .custom_wordlist.txt diff --git a/.custom_wordlist.txt b/.custom_wordlist.txt new file mode 100644 index 0000000..95e9557 --- /dev/null +++ b/.custom_wordlist.txt @@ -0,0 +1,6 @@ +config_changed +upgrade_charm +agent_relation_joined +agent_relation_changed +agent_relation_departed +rebasing \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0e6d642..6c6e59f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,15 +8,15 @@ Applicable spec: -### Juju Events Changes +### Juju events changes -### Module Changes +### Module changes -### Library Changes +### Library changes diff --git a/README.md b/README.md index 43b0564..cf8e670 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Jenkins-agent-k8s Operator +# Jenkins-agent-k8s operator [![CharmHub Badge](https://charmhub.io/jenkins-agent-k8s/badge.svg)](https://charmhub.io/jenkins-agent-k8s) [![Publish to edge](https://github.com/canonical/jenkins-agent-k8s-operator/actions/workflows/publish_charm.yaml/badge.svg)](https://github.com/canonical/jenkins-agent-k8s-operator/actions/workflows/publish_charm.yaml) diff --git a/docs/explanation/charm-architecture.md b/docs/explanation/charm-architecture.md index 23f50e6..8f6e7b0 100644 --- a/docs/explanation/charm-architecture.md +++ b/docs/explanation/charm-architecture.md @@ -40,7 +40,7 @@ the agent application. The agent JAR is downloaded as `/var/lib/jenkins/agent.ja To indicate any startup failures, the `/var/lib/jenkins/agents.ready` file is created just before starting the agent application and removed if the agent was not able to start successfully. -### Jenkins Agent Operator +### Jenkins agent operator This container is the main point of contact with the Juju controller. It communicates with Juju to run necessary charm code defined by the main `src/charm.py`. The source code is copied to the @@ -68,15 +68,15 @@ The [Jenkins](https://charmhub.io/jenkins-k8s) controller, a CI server for which For this charm, the following events are observed: 1. [jenkins_agent_k8s_pebble_ready](https://juju.is/docs/sdk/container-name-pebble-ready-event): fired on Kubernetes charms when the requested container is ready. -Action: wait for the integrations and configuration, download the JAR, configure the container and replan the service. +Action: wait for the integrations and configuration, download the JAR, configure the container and re-plan the service. 2. [config_changed](https://juju.is/docs/sdk/config-changed-event): usually fired in response to a configuration change using the CLI. -Action: wait for the integrations and configuration, download the JAR, configure the container and replan the service. +Action: wait for the integrations and configuration, download the JAR, configure the container and re-plan the service. 3. [upgrade_charm](https://juju.is/docs/sdk/upgrade-charm-event): fired when a charm upgrade is triggered. -Action: wait for the integrations and configuration, download the JAR, configure the container and replan the service. +Action: wait for the integrations and configuration, download the JAR, configure the container and re-plan the service. 4. [agent_relation_joined](https://juju.is/docs/sdk/relation-name-relation-joined-event): emitted when a unit joins the relation. -Action: download the JAR, configure the container and replan the service. -5. [agent_relation_changed](https://juju.is/docs/sdk/relation-name-relation-changed-event): triggered when another unit involved in the relation changed the data in the relation databag. -Action: download the JAR, configure the container and replan the service. +Action: download the JAR, configure the container and re-plan the service. +5. [agent_relation_changed](https://juju.is/docs/sdk/relation-name-relation-changed-event): triggered when another unit involved in the relation changed the data in the relation data bag. +Action: download the JAR, configure the container and re-plan the service. 6. [agent_relation_departed](https://juju.is/docs/sdk/relation-name-relation-departed-event): fired when a unit departs the relation. Action: stop the service. diff --git a/docs/how-to/contribute.md b/docs/how-to/contribute.md index 4ec71b4..4435363 100644 --- a/docs/how-to/contribute.md +++ b/docs/how-to/contribute.md @@ -16,7 +16,6 @@ This document explains the processes and practices recommended for contributing - test coverage - user experience for Juju operators of this charm. - Please help us out in ensuring easy to review branches by rebasing your pull request branch onto the `main` branch. This also avoids merge commits and creates a linear Git commit history. -- Please generate src documentation for every commit. See the section below for more details. ## Developing @@ -73,6 +72,6 @@ juju deploy ./jenkins-agent-k8s_ubuntu-22.04-amd64.charm \ --resource jenkins-agent-k8s-image=localhost:32000/jenkins-agent-k8s:latest ``` -## Canonical Contributor Agreement +## Canonical contributor agreement Canonical welcomes contributions to the Jenkins agent k8s operator. Please check out our [contributor agreement](https://ubuntu.com/legal/contributors) if you're interested in contributing to the solution. diff --git a/docs/index.md b/docs/index.md index 533ece0..71157c7 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -# Jenkins Agent K8s Operator +# Jenkins agent K8s operator A [Juju](https://juju.is/) [charm](https://juju.is/docs/olm/charmed-operators) deploying and managing [Jenkins](https://www.jenkins.io/) agents on Kubernetes. This charm is configurable to use with a Jenkins charm deployed in another Juju model, or to connect to a standalone Jenkins instance. diff --git a/docs/reference/integrations.md b/docs/reference/integrations.md index 346757f..7d0d9c5 100644 --- a/docs/reference/integrations.md +++ b/docs/reference/integrations.md @@ -1,6 +1,7 @@ # Integrations - + ### agent + _Interface_: jenkins_agent_v0 _Supported charms_: [jenkins](https://charmhub.io/jenkins) From f0b99d30f481d593c29946c3be3949f193f9e066 Mon Sep 17 00:00:00 2001 From: DeeKay3 Date: Thu, 10 Jul 2025 15:33:54 +0100 Subject: [PATCH 2/5] docs: adding a comment for a vale off --- docs/reference/integrations.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/reference/integrations.md b/docs/reference/integrations.md index 7d0d9c5..e5c317a 100644 --- a/docs/reference/integrations.md +++ b/docs/reference/integrations.md @@ -1,5 +1,6 @@ # Integrations + From 3c827b8094b05ccff199ea0ec01d25b8043a6d12 Mon Sep 17 00:00:00 2001 From: DeeKay3 Date: Thu, 10 Jul 2025 16:30:14 +0100 Subject: [PATCH 3/5] docs/ISD-3479: Code-formatting instead of adding words to custom wordlist --- docs/explanation/charm-architecture.md | 12 ++++++------ docs/reference/integrations.md | 7 +++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/explanation/charm-architecture.md b/docs/explanation/charm-architecture.md index 8f6e7b0..2b998d6 100644 --- a/docs/explanation/charm-architecture.md +++ b/docs/explanation/charm-architecture.md @@ -67,17 +67,17 @@ The [Jenkins](https://charmhub.io/jenkins-k8s) controller, a CI server for which For this charm, the following events are observed: -1. [jenkins_agent_k8s_pebble_ready](https://juju.is/docs/sdk/container-name-pebble-ready-event): fired on Kubernetes charms when the requested container is ready. +1. [`jenkins_agent_k8s_pebble_ready`](https://juju.is/docs/sdk/container-name-pebble-ready-event): fired on Kubernetes charms when the requested container is ready. Action: wait for the integrations and configuration, download the JAR, configure the container and re-plan the service. -2. [config_changed](https://juju.is/docs/sdk/config-changed-event): usually fired in response to a configuration change using the CLI. +2. [`config_changed`](https://juju.is/docs/sdk/config-changed-event): usually fired in response to a configuration change using the CLI. Action: wait for the integrations and configuration, download the JAR, configure the container and re-plan the service. -3. [upgrade_charm](https://juju.is/docs/sdk/upgrade-charm-event): fired when a charm upgrade is triggered. +3. [`upgrade_charm`](https://juju.is/docs/sdk/upgrade-charm-event): fired when a charm upgrade is triggered. Action: wait for the integrations and configuration, download the JAR, configure the container and re-plan the service. -4. [agent_relation_joined](https://juju.is/docs/sdk/relation-name-relation-joined-event): emitted when a unit joins the relation. +4. [`agent_relation_joined`](https://juju.is/docs/sdk/relation-name-relation-joined-event): emitted when a unit joins the relation. Action: download the JAR, configure the container and re-plan the service. -5. [agent_relation_changed](https://juju.is/docs/sdk/relation-name-relation-changed-event): triggered when another unit involved in the relation changed the data in the relation data bag. +5. [`agent_relation_changed`](https://juju.is/docs/sdk/relation-name-relation-changed-event): triggered when another unit involved in the relation changed the data in the relation data bag. Action: download the JAR, configure the container and re-plan the service. -6. [agent_relation_departed](https://juju.is/docs/sdk/relation-name-relation-departed-event): fired when a unit departs the relation. +6. [`agent_relation_departed`](https://juju.is/docs/sdk/relation-name-relation-departed-event): fired when a unit departs the relation. Action: stop the service. ## Charm code overview diff --git a/docs/reference/integrations.md b/docs/reference/integrations.md index e5c317a..50df7b9 100644 --- a/docs/reference/integrations.md +++ b/docs/reference/integrations.md @@ -1,8 +1,7 @@ # Integrations - - + +### `agent` + _Interface_: jenkins_agent_v0 _Supported charms_: [jenkins](https://charmhub.io/jenkins) From 618637f3aabb30fb21134318090f02438ee82888 Mon Sep 17 00:00:00 2001 From: DeeKay3 Date: Thu, 10 Jul 2025 16:31:17 +0100 Subject: [PATCH 4/5] ISD-3479: Remove unnecessary custom words --- .custom_wordlist.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.custom_wordlist.txt b/.custom_wordlist.txt index 95e9557..e0cd892 100644 --- a/.custom_wordlist.txt +++ b/.custom_wordlist.txt @@ -1,6 +1 @@ -config_changed -upgrade_charm -agent_relation_joined -agent_relation_changed -agent_relation_departed -rebasing \ No newline at end of file +rebasing From 659cd39d932d5e74885ccb1fa243496b46e1c572 Mon Sep 17 00:00:00 2001 From: DeeKay3 Date: Fri, 11 Jul 2025 15:59:59 +0100 Subject: [PATCH 5/5] Adding a vulnerability to trivyignore, to be fixed in pebble --- .trivyignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.trivyignore b/.trivyignore index 1e25c82..9f34a96 100644 --- a/.trivyignore +++ b/.trivyignore @@ -4,3 +4,4 @@ CVE-2024-34156 CVE-2025-48734 # Waiting for a fix in pebble CVE-2024-45338 +CVE-2025-22874