Skip to content

Commit 8abfa02

Browse files
jackgopack4mx-psi
andauthored
Migrate ocb binary release to opentelemetry-collector-releases (#10710)
After discussion with the collector SIG call this week, July 31st, I have made small tweaks to the artifact release that will not require an "extra step" of pushing tags. If these changes are accepted, the distributions will be released under tag "vX.XXX.X" and the ocb binaries will be released under "cmd/builder/vX.XXX.X" but both under this repo, opentelemetry-collector-releases. The workflow `builder-release.yaml` in releases repo will push the additional tags necessary for the builder release. Refactoring the release process as mentioned in past issues/PRs. ocb binary is currently released in a separate release tag under this repository, which makes it harder to find and inconsistent with the rest of the binaries and images releasing in the opentelemetry-collector-releases repository. Releasing the ocb binaries in opentelemetry-collector-releases makes this process more standardized and also opens the opportunity to release more tools alongside ocb binary down the road, like corresponding docker images (as discussed in #5712). #### Link to tracking issue Fixes #10662 Mentioned in [releases issue # 295](open-telemetry/opentelemetry-collector-releases#295) [Corresponding PR in opentelemetry-collector-releases](open-telemetry/opentelemetry-collector-releases#608) #### Testing Sample binary release in [forked jackgopack4/opentelemetry-collector-releases repo](https://github.com/jackgopack4/opentelemetry-collector-releases/releases/tag/cmd%2Fbuilder%2Fv0.106.1) #### Documentation Updated corresponding documentation to reflect new release process --------- Co-authored-by: Pablo Baeyens <[email protected]>
1 parent 7638bb2 commit 8abfa02

File tree

5 files changed

+32
-92
lines changed

5 files changed

+32
-92
lines changed

.chloggen/ocb-migration.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7+
component: ocb
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: migrate build and release of ocb binaries to opentelemetry-collector-releases repository
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [10710]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: ocb binaries will now be released under open-telemetry/opentelemetry-collector-releases tagged as "cmd/builder/vX.XXX.X"
19+
20+
# Optional: The change log or logs in which this entry should be included.
21+
# e.g. '[user]' or '[user, api]'
22+
# Include 'user' if the change is relevant to end users.
23+
# Include 'api' if there is a change to a library API.
24+
# Default: '[user]'
25+
change_logs: [user]

.github/workflows/check-goreleaser.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/builder-release.yaml renamed to .github/workflows/sourcecode-release.yaml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Builder - Release
1+
name: Source Code - Release
22

33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- "v*"
77

88
jobs:
99
goreleaser:
@@ -13,19 +13,6 @@ jobs:
1313
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1414
with:
1515
fetch-depth: 0
16-
- name: Setup Go
17-
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
18-
with:
19-
go-version: ~1.21.5
20-
- name: Run GoReleaser
21-
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0
22-
with:
23-
distribution: goreleaser-pro
24-
version: latest
25-
args: release --clean -f cmd/builder/.goreleaser.yml
26-
env:
27-
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2916
- name: Create Github Release
3017
run: |
3118
gh release create ${{ github.ref_name }} -t ${{ github.ref_name }} -n "### Images and binaries here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/${{ github.ref_name }}"

cmd/builder/.goreleaser.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

docs/release.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ It is possible that a core approver isn't a contrib approver. In that case, the
4646

4747
If you set your remote using `https` you need to include `REMOTE=https://github.com/open-telemetry/opentelemetry-collector.git` in each command. Wait for the new tag build to pass successfully.
4848

49-
6. The release script for the collector builder should create a new GitHub release for the builder. This is a separate release from the core, but we might join them in the future if it makes sense.
50-
51-
7. A new `v0.85.0` release should be automatically created on Github by now. Edit it and use the contents from the CHANGELOG.md and CHANGELOG-API.md as the release's description.
49+
6. A new `v0.85.0` source code release should be automatically created on Github by now. Edit it and use the contents from the CHANGELOG.md and CHANGELOG-API.md as the release's description.
5250

5351
## Releasing opentelemetry-collector-contrib
5452

@@ -74,10 +72,9 @@ It is possible that a core approver isn't a contrib approver. In that case, the
7472
5. A new `v0.85.0` release should be automatically created on Github by now. Edit it and use the contents from the CHANGELOG.md as the release's description.
7573

7674
## Producing the artifacts
77-
7875
The last step of the release process creates artifacts for the new version of the collector and publishes images to Dockerhub. The steps in this portion of the release are done in the [opentelemetry-collector-releases](https://github.com/open-telemetry/opentelemetry-collector-releases) repo.
7976

80-
1. Update the `./distribution/**/manifest.yaml` files to include the new release version.
77+
1. Update the `./distributions/**/manifest.yaml` files to include the new release version.
8178

8279
2. Update the builder version in `OTELCOL_BUILDER_VERSION` to the new release in the `Makefile`. While this might not be strictly necessary for every release, this is a good practice.
8380

@@ -86,12 +83,14 @@ The last step of the release process creates artifacts for the new version of th
8683

8784
4. Check out the commit created by merging the PR and tag with the new release version by running the `make push-tags TAG=v0.85.0` command. If you set your remote using `https` you need to include `REMOTE=https://github.com/open-telemetry/opentelemetry-collector-releases.git` in each command. Wait for the new tag build to pass successfully.
8885

89-
5. Ensure the "Release Core", "Release Contrib" and "Release k8s" actions pass, this will
86+
5. Ensure the "Release Core", "Release Contrib", "Release k8s", and "Builder - Release" actions pass, this will
9087

9188
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`
9289

9390
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).
9491

92+
3. build and release ocb binaries under a separate tagged Github release, e.g. `cmd/builder/v0.85.0`
93+
9594
## Troubleshooting
9695

9796
1. `unknown revision internal/coreinternal/v0.85.0` -- This is typically an indication that there's a dependency on a new module. You can fix it by adding a new `replaces` entry to the `go.mod` for the affected module.

0 commit comments

Comments
 (0)