File tree Expand file tree Collapse file tree
src/github_runner_image_builder/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44[project ]
55name = " github-runner-image-builder"
6- version = " 0.12 .0"
6+ version = " 0.13 .0"
77authors = [
88 { name = " Canonical IS DevOps" , email = " is-devops-team@canonical.com" },
99]
@@ -32,7 +32,7 @@ dependencies = { file = ["requirements.txt"] }
3232
3333[tool .pydocstyle ]
3434match = " src/github_runner_image_builder/cli.py"
35- ignore = [" D301" ] # ignore backshlashes in docstring - click lib uses them.
35+ ignore = [" D301" ] # ignore backshlashes in docstring - click lib uses them.
3636
3737
3838[tool .bandit ]
Original file line number Diff line number Diff line change @@ -120,6 +120,12 @@ function install_yq() {
120120 /usr/bin/snap remove go
121121}
122122
123+ function install_opentelemetry_collector_snap() {
124+ echo " Installing OpenTelemetry Collector snap"
125+ /usr/bin/sudo snap install opentelemetry-collector --stable
126+ /usr/bin/sudo snap disable opentelemetry-collector
127+ }
128+
123129function install_github_runner() {
124130 version=" $1 "
125131 arch=" $2 "
@@ -172,6 +178,7 @@ if [ $RELEASE != "focal" ]; then
172178 install_yarn
173179fi
174180install_yq
181+ install_opentelemetry_collector_snap
175182install_github_runner " $github_runner_version " " $github_runner_arch "
176183chown_home
177184configure_system_users
Original file line number Diff line number Diff line change @@ -38,6 +38,13 @@ class Commands:
3838 name = "check aproxy" ,
3939 command = "sudo snap info aproxy && sudo snap services aproxy" ,
4040 ),
41+ Commands (
42+ name = "check opentelemetry-collector snap installed and inactive" ,
43+ command = (
44+ "sudo snap services opentelemetry-collector | grep -q 'disabled' "
45+ "&& sudo snap services opentelemetry-collector | grep -q 'inactive'"
46+ ),
47+ ),
4148 Commands (name = "update apt in docker" , command = "docker run python:3.10-slim apt-get update" ),
4249 Commands (name = "docker version" , command = "docker version" ),
4350 Commands (name = "check python3 alias" , command = "python --version" ),
Original file line number Diff line number Diff line change @@ -831,6 +831,12 @@ def test__generate_cloud_init_script(
831831 /usr/bin/snap remove go
832832}}
833833
834+ function install_opentelemetry_collector_snap() {{
835+ echo "Installing OpenTelemetry Collector snap"
836+ /usr/bin/sudo snap install opentelemetry-collector --stable
837+ /usr/bin/sudo snap disable opentelemetry-collector
838+ }}
839+
834840function install_github_runner() {{
835841 version="$1"
836842 arch="$2"
@@ -884,6 +890,7 @@ def test__generate_cloud_init_script(
884890 install_yarn
885891fi
886892install_yq
893+ install_opentelemetry_collector_snap
887894install_github_runner "$github_runner_version" "$github_runner_arch"
888895chown_home
889896configure_system_users\
Original file line number Diff line number Diff line change 11
22<!-- vale Canonical.007-Headings-sentence-case = NO -->
33
4+ ## [ #195 feat: otel-collector snap] ( https://github.com/canonical/github-runner-image-builder-operator/pull/195 ) (2026-02-11)
5+ * Install opentelemetry collector snap in the runner image.
6+
47## [ #172 feat: apt upgrade] ( https://github.com/canonical/github-runner-image-builder-operator/pull/172 ) (2025-11-26)
58* Apply apt-update and apt-upgrade to GH runner images by applying them during cloud-init.
69
You can’t perform that action at this time.
0 commit comments