From 8e3fd72b23778b588e6efdaaceed22984f56f01a Mon Sep 17 00:00:00 2001 From: Ken Finnigan Date: Wed, 24 Apr 2024 15:45:55 -0400 Subject: [PATCH] fix: OTeL update process and add docs Signed-off-by: Ken Finnigan --- .github/workflows/otel-update.yml | 4 ++++ README.md | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.github/workflows/otel-update.yml b/.github/workflows/otel-update.yml index 8ffb0b5..4552694 100644 --- a/.github/workflows/otel-update.yml +++ b/.github/workflows/otel-update.yml @@ -41,6 +41,7 @@ jobs: run: | tag_name=${{ steps.get-latest-otel-version.outputs.latest_otel_version }} latest_version=$(echo $tag_name | cut -c 2-) + current_version=${{ steps.get-current-otel-version.outputs.current_version }} git checkout -b update-otel-$tag_name echo $latest_version > OTEL_VERSION @@ -50,6 +51,9 @@ jobs: # Update version in builder-config.yaml sed -i "s/$current_version/$latest_version/g" cmd/otelcontribcol/builder-config.yaml + # Update version in versions.yaml + sed -i "s/$current_version/$latest_version/g" versions.yaml + # Run checks to run `go mod tidy` and regenerate otelcontribcol make checks diff --git a/README.md b/README.md index d85e7cd..eb0835d 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,25 @@ Add the new component to the following files: Run `make` to ensure the code builds correctly. +## OTeL Collector Contrib Releases + +Every week the `check-for-otel-update` workflow will execute looking for a more recent release +of [OTeL Collector Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib). +It uses the version in `OTEL_VERSION`, which is set to the current version used, +to determine if there is a more recent release. + +If a new release is found, it updates the following files: + +- [builder-config.yaml](cmd/otelcontribcol/builder-config.yaml) +- [versions.yaml](versions.yaml) +- */go.mod files + +The workflow runs `make checks` to regenerate the collector build and `tidy` the go modules. + +A branch is created with the changes, and a PR is opened. + +**Note:** The `check-for-otel-update` workflow does **not** pull the changes from the coped `/internal/k8sconfig` module. Changes in this module will need to be manually included. + ## How to Release? ### What version to use?