Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[project]
name = "github-runner-image-builder"
version = "0.12.0"
version = "0.13.0"
authors = [
{ name = "Canonical IS DevOps", email = "is-devops-team@canonical.com" },
]
Expand Down Expand Up @@ -32,7 +32,7 @@ dependencies = { file = ["requirements.txt"] }

[tool.pydocstyle]
match = "src/github_runner_image_builder/cli.py"
ignore = ["D301"] # ignore backshlashes in docstring - click lib uses them.
ignore = ["D301"] # ignore backshlashes in docstring - click lib uses them.


[tool.bandit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ function install_yq() {
/usr/bin/snap remove go
}

function install_opentelemetry_collector_snap() {
echo "Installing OpenTelemetry Collector snap"
/usr/bin/sudo snap install opentelemetry-collector --stable
/usr/bin/sudo snap disable opentelemetry-collector
}

function install_github_runner() {
version="$1"
arch="$2"
Expand Down Expand Up @@ -172,6 +178,7 @@ if [ $RELEASE != "focal" ]; then
install_yarn
fi
install_yq
install_opentelemetry_collector_snap
install_github_runner "$github_runner_version" "$github_runner_arch"
chown_home
configure_system_users
7 changes: 7 additions & 0 deletions app/tests/integration/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ class Commands:
name="check aproxy",
command="sudo snap info aproxy && sudo snap services aproxy",
),
Commands(
name="check opentelemetry-collector snap installed and inactive",
command=(
"sudo snap services opentelemetry-collector | grep -q 'disabled' "
"&& sudo snap services opentelemetry-collector | grep -q 'inactive'"
),
),
Commands(name="update apt in docker", command="docker run python:3.10-slim apt-get update"),
Commands(name="docker version", command="docker version"),
Commands(name="check python3 alias", command="python --version"),
Expand Down
7 changes: 7 additions & 0 deletions app/tests/unit/test_openstack_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,12 @@ def test__generate_cloud_init_script(
/usr/bin/snap remove go
}}

function install_opentelemetry_collector_snap() {{
echo "Installing OpenTelemetry Collector snap"
/usr/bin/sudo snap install opentelemetry-collector --stable
/usr/bin/sudo snap disable opentelemetry-collector
}}

function install_github_runner() {{
version="$1"
arch="$2"
Expand Down Expand Up @@ -884,6 +890,7 @@ def test__generate_cloud_init_script(
install_yarn
fi
install_yq
install_opentelemetry_collector_snap
install_github_runner "$github_runner_version" "$github_runner_arch"
chown_home
configure_system_users\
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

<!-- vale Canonical.007-Headings-sentence-case = NO -->

## [#195 feat: otel-collector snap](https://github.com/canonical/github-runner-image-builder-operator/pull/195) (2026-02-11)
* Install opentelemetry collector snap in the runner image.

Check failure on line 5 in docs/changelog.md

View workflow job for this annotation

GitHub Actions / docs-checks / vale

[vale] reported by reviewdog 🐶 [Canonical.000-US-spellcheck] The word 'opentelemetry' seems to be misspelled. Raw Output: {"message": "[Canonical.000-US-spellcheck] The word 'opentelemetry' seems to be misspelled.", "location": {"path": "docs/changelog.md", "range": {"start": {"line": 5, "column": 11}}}, "severity": "ERROR"}

## [#172 feat: apt upgrade](https://github.com/canonical/github-runner-image-builder-operator/pull/172) (2025-11-26)
* Apply apt-update and apt-upgrade to GH runner images by applying them during cloud-init.

Expand Down
Loading