Skip to content

Commit 5e45d60

Browse files
authored
[chore] Use renovate to update collector components (#1087)
* [chore] use renovate to update collector components * update release doc * add note on manual renovate triggers * combine core and contrib components * try out builtin manager
1 parent edda679 commit 5e45d60

File tree

7 files changed

+24
-35
lines changed

7 files changed

+24
-35
lines changed

.github/workflows/base-binary-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
description: "The collector dependency will be put into this folder"
1919

2020
env:
21-
# renovate: datasource=github-releases depName=goreleaser/goreleaser-pro
21+
# renovate: datasource=github-releases packageName=goreleaser/goreleaser-pro
2222
GORELEASER_PRO_VERSION: v2.12.1
2323

2424
permissions:

.github/workflows/base-ci-binary.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ permissions:
2222
contents: read
2323

2424
env:
25-
# renovate: datasource=github-releases depName=goreleaser/goreleaser-pro
25+
# renovate: datasource=github-releases packageName=goreleaser/goreleaser-pro
2626
GORELEASER_PRO_VERSION: v2.12.1
2727

2828
jobs:

.github/workflows/base-ci-goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ permissions:
3636
contents: read
3737

3838
env:
39-
# renovate: datasource=github-releases depName=goreleaser/goreleaser-pro
39+
# renovate: datasource=github-releases packageName=goreleaser/goreleaser-pro
4040
GORELEASER_PRO_VERSION: v2.12.1
4141

4242
jobs:

.github/workflows/base-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ permissions:
2525
contents: read
2626

2727
env:
28-
# renovate: datasource=github-releases depName=goreleaser/goreleaser-pro
28+
# renovate: datasource=github-releases packageName=goreleaser/goreleaser-pro
2929
GORELEASER_PRO_VERSION: v2.12.1
3030

3131
jobs:

.github/workflows/scripts/bump-versions.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ if [ -n "$current_stable" ] && [ -z "$next_stable_core" ]; then
139139
next_stable_core=$(bump_version "$current_stable")
140140
fi
141141

142-
# add escape characters to the current versions to work with sed
143-
escaped_current_beta_core=${current_beta_core//./\\.}
144-
escaped_current_beta_contrib=${current_beta_contrib//./\\.}
145-
escaped_current_stable=${current_stable//./\\.}
146-
147142
# Update versions in each manifest file
148143
echo "Making the following updates:"
149144
echo " - core beta module set from $current_beta_core to $next_beta_core"
@@ -152,23 +147,13 @@ echo " - contrib beta module set from $current_beta_contrib to $next_beta_contr
152147
echo " - distribution version to $next_distribution_version"
153148
for file in "${manifest_files[@]}"; do
154149
if [ -f "$file" ]; then
155-
sed "s/\(^.*go\.opentelemetry\.io\/collector\/.*\) v$escaped_current_beta_core/\1 v$next_beta_core/" "$file" > "$file.tmp"
156-
mv "$file.tmp" "$file"
157-
sed "s/\(^.*github\.com\/open-telemetry\/opentelemetry-collector-contrib\/.*\) v$escaped_current_beta_contrib/\1 v$next_beta_contrib/" "$file" > "$file.tmp"
158-
mv "$file.tmp" "$file"
159-
sed "s/\(^.*go\.opentelemetry\.io\/collector\/.*\) v$escaped_current_stable/\1 v$next_stable_core/" "$file" > "$file.tmp"
160-
mv "$file.tmp" "$file"
161150
sed "s/version: .*/version: $next_distribution_version/" "$file" > "$file.tmp"
162151
mv "$file.tmp" "$file"
163152
else
164153
echo "File $file does not exist"
165154
fi
166155
done
167156

168-
# Update Makefile OCB version
169-
sed "s/OTELCOL_BUILDER_VERSION ?= $escaped_current_beta_core/OTELCOL_BUILDER_VERSION ?= $next_beta_core/" Makefile > Makefile.tmp
170-
mv Makefile.tmp Makefile
171-
172157
echo "Version update completed."
173158

174159
# Make a new changelog update

docs/release.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,27 @@ For general information about all Collector repositories release procedures, see
1111
0. Ensure that the [opentelemetry-collector][1] and [opentelemetry-collector-contrib][2] release procedures have been followed and a new
1212
opentelemetry-collector and opentelemetry-collector-contrib version have been released. The opentelemetry-collector-releases release
1313
should be done after both of these releases.
14-
1. Run the GitHub Action workflow "[Update Version in Distributions and Prepare PR](https://github.com/open-telemetry/opentelemetry-collector-releases/actions/workflows/update-version.yaml)" which will update the minor version automatically (e.g. v0.116.0 -> v0.117.0) or manually provide a new version if releasing a bugfix or skipping a version. Select "create pr" option.
14+
1. Review and merge the 2 Renovate PRs for core and contrib components, including OCB. If they were not created or updated yet, you can go to the **Dependency Dashboard** GitHub issue and check the boxes for the updates or for a manual Renovate run to expedite the process.
15+
2. Run the GitHub Action workflow "[Update Version in Distributions and Prepare PR](https://github.com/open-telemetry/opentelemetry-collector-releases/actions/workflows/update-version.yaml)" which will update the minor version automatically (e.g. v0.116.0 -> v0.117.0) or manually provide a new version if releasing a bugfix or skipping a version. Select "create pr" option.
1516
The PR needs to be manually closed and re-opened once to trigger pipelines.
1617
- 🛑 **Do not move forward until this PR is merged.** 🛑
17-
2. Check out main and ensure it has the "Update version from ..." commit in your local
18+
3. Check out main and ensure it has the "Update version from ..." commit in your local
1819
copy by pulling in the latest from
1920
`open-telemetry/opentelemetry-collector-releases`. Assuming your upstream
2021
remote is named `upstream`, you can try running:
2122
- `git checkout main && git fetch upstream && git rebase upstream/main`
22-
3. Create a tag for the new release version by running:
23+
4. Create a tag for the new release version by running:
2324

2425
⚠️ If you set your remote using `https` you need to include `REMOTE=https://github.com/open-telemetry/opentelemetry-collector-releases.git` in each command. ⚠️
2526

2627
- `make push-tags TAG=v0.85.0`
27-
4. Wait for the new tag build to pass successfully.
28-
5. Ensure the "Release Core", "Release Contrib", "Release k8s", "Release OTLP", "Release Builder" and "Release OpAMP Suporvisor" actions pass, this will
28+
5. Wait for the new tag build to pass successfully.
29+
6. Ensure the "Release Core", "Release Contrib", "Release k8s", "Release OTLP", "Release Builder" and "Release OpAMP Suporvisor" actions pass, this will
2930
1. push new container images to `https://hub.docker.com/repository/docker/otel/opentelemetry-collector`, `https://hub.docker.com/repository/docker/otel/opentelemetry-collector-contrib` and `https://hub.docker.com/repository/docker/otel/opentelemetry-collector-k8s` as well as their respective counterparts on GHCR
3031
2. create a Github release for the tag and push all the build artifacts to the Github release. See [example](https://github.com/open-telemetry/opentelemetry-collector-releases/actions/workflows/release-core.yaml).
3132
3. build and release ocb and opampsupervisor binaries under a separate tagged Github release, e.g. `cmd/{builder,opampsupervisor}/v0.85.0`
3233
4. build and push ocb and opampsupervisor Docker images to `https://hub.docker.com/r/otel/opentelemetry-collector-builder` and the GitHub Container Registry within the releases repository (and opampsupervisor respectively)
33-
6. Update the release notes with the CHANGELOG.md updates.
34+
7. Update the release notes with the CHANGELOG.md updates.
3435

3536
## Post-release steps
3637

renovate.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"config:best-practices",
1515
"helpers:pinGitHubActionDigestsToSemver"
1616
],
17+
"ocb": {
18+
"managerFilePatterns": ["/(^|\\/)manifest.ya?ml$/"]
19+
},
1720
"packageRules": [
1821
{
1922
"matchManagers": [
@@ -98,15 +101,6 @@
98101
"golang.org/x{/,}**"
99102
]
100103
},
101-
{
102-
"matchManagers": [
103-
"gomod"
104-
],
105-
"groupName": "All go.opentelemetry.io/collector packages",
106-
"matchPackageNames": [
107-
"go.opentelemetry.io/collector{/,}**"
108-
]
109-
},
110104
{
111105
"matchManagers": [
112106
"gomod"
@@ -145,6 +139,15 @@
145139
"github.com/goreleaser/goreleaser-pro"
146140
],
147141
"groupName": "GoReleaser Pro"
142+
},
143+
{
144+
"matchPackageNames": [
145+
"open-telemetry/opentelemetry-collector",
146+
"/^go\\.opentelemetry\\.io/collector//",
147+
"open-telemetry/opentelemetry-collector-contrib",
148+
"/^github\\.com/open-telemetry/opentelemetry-collector-contrib//"
149+
],
150+
"groupName": "OpenTelemetry Collector Components"
148151
}
149152
],
150153
"customManagers": [
@@ -158,7 +161,7 @@
158161
"/(^|\\/).*\\.sh$/"
159162
],
160163
"matchStrings": [
161-
"# renovate: datasource=(?<datasource>.+?) depName=(?<depName>.+?)\\s.*(:|=|\\?=|:=|\\+=) ?\\\"?(?<currentValue>.+?)?\\\"?\\s"
164+
"# renovate: datasource=(?<datasource>.+?)(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)\\s.*(:|=|\\?=|:=|\\+=) ?\\\"?(?<currentValue>.+?)?\\\"?\\s"
162165
]
163166
}
164167
],

0 commit comments

Comments
 (0)