Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3ef3d04
add nightly release setup with pipeline and goreleaser settings
mowies Jul 3, 2025
b772ef3
revert otelcol dockers
mowies Jul 16, 2025
97465d3
fix pipeline
mowies Jul 16, 2025
770e212
cherry pick fixes?
mowies Jul 17, 2025
97c5a1d
more setup things
mowies Jul 17, 2025
e7e421b
revert some debugging changes
mowies Jul 22, 2025
46c364b
revert goreleaser debugging changes
mowies Jul 22, 2025
680618b
revert debugging changes for builder and opamp
mowies Jul 22, 2025
ee14504
revert debugging changes in dockerfiles
mowies Jul 22, 2025
0f319c4
remove force pushes
mowies Jul 23, 2025
b91d098
Merge branch 'main' into two-step-release-process
mowies Jul 23, 2025
b29252a
Merge branch 'main' into two-step-release-process
mowies Jul 23, 2025
1c28859
Merge branch 'main' into two-step-release-process
mowies Jul 24, 2025
abe369f
rename GORELEASER_PREVIOUS_TAG
mowies Jul 24, 2025
52bb40d
filter tags before taking the right one for all release pipelines
mowies Jul 22, 2025
637a143
adjust doc comments
mowies Jul 24, 2025
c4ef958
add missing newlines
mowies Jul 24, 2025
d4bcc8c
Merge branch 'main' into two-step-release-process
mowies Jul 24, 2025
9d01019
update goreleaser to correct version
mowies Jul 28, 2025
f929a2d
revert change of github token in base-release
mowies Jul 28, 2025
8a65a1b
add comments
mowies Jul 28, 2025
56cf929
Merge branch 'main' into two-step-release-process
mowies Jul 28, 2025
87bab64
Merge branch 'main' into two-step-release-process
mowies Jul 29, 2025
a7c1cb1
use otelbot short time token for pushing nightly tags
mowies Jul 29, 2025
317a755
set specific content write permission for new token
mowies Jul 29, 2025
33b71f6
disable publishing nightly releases
mowies Jul 29, 2025
3fe58dd
revert changes of github tokens
mowies Jul 29, 2025
da81c5b
revert changes of github tokens
mowies Jul 29, 2025
a0d3869
set up otelbot app committer name and email correctly
mowies Jul 29, 2025
4c6f299
create issue on failed nightly release
mowies Jul 29, 2025
0beaca3
add note about other distro releases
mowies Jul 29, 2025
2d99c77
Merge branch 'main' into two-step-release-process
mowies Jul 30, 2025
17d6470
Merge branch 'main' into two-step-release-process
mowies Jul 30, 2025
48d0ede
add changelog entry
mowies Jul 30, 2025
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
37 changes: 32 additions & 5 deletions .github/workflows/base-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@ on:
required: false
type: string
default: ubuntu-24.04
nightly:
required: false
type: string
default: false

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
GORELEASER_PRO_VERSION: v2.7.0

jobs:
prepare:
outputs:
GORELEASER_PREVIOUS_TAG: ${{ steps.prev-tag.outputs.GORELEASER_PREVIOUS_TAG }}
strategy:
matrix:
GOOS: ${{ fromJSON(inputs.goos) }}
Expand Down Expand Up @@ -70,8 +76,26 @@ jobs:
go-version: "~1.24"
check-latest: true

- name: Set GORELEASER_PREVIOUS_TAG in actual release
id: prev-tag
if: inputs.nightly != 'true'
# find previous tag by filtering out nightly tags and choosing the
# second to last tag (last one is the current release)
# TODO fix this filter to only filter builder tags
run: |
prev_tag=$(git tag | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1)
echo "GORELEASER_PREVIOUS_TAG=$prev_tag" >> "$GITHUB_OUTPUT"

- name: Set nightly enabled
id: nightly-check
if: inputs.nightly == 'true'
run: |
echo "NIGHTLY_FLAG=--nightly" >> "$GITHUB_OUTPUT"

- name: Generate distribution sources
run: make generate-sources
env:
DISTRIBUTIONS: ${{ inputs.distribution }}

- name: Log into Docker.io
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
Expand Down Expand Up @@ -99,16 +123,17 @@ jobs:
distribution: goreleaser-pro
version: ${{ env.GORELEASER_PRO_VERSION }}
workdir: distributions/${{ inputs.distribution }}
args: release --clean --split --timeout 2h --config .goreleaser-build.yaml --release-header-tmpl=../../.github/release-template.md
args: release --clean --split --timeout 2h --config .goreleaser-build.yaml --release-header-tmpl=../../.github/release-template.md ${{ steps.nightly-check.outputs.NIGHTLY_FLAG }}
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GOARM: "7" # Default is 6
GOAMD64: v1
GOPPC64: power8
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_YES: true
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}

- name: Move built artifacts
if: inputs.distribution == 'otelcol-contrib'
Expand All @@ -125,12 +150,12 @@ jobs:
distribution: goreleaser-pro
version: ${{ env.GORELEASER_PRO_VERSION }}
workdir: distributions/${{ inputs.distribution }}
args: release --clean --split --timeout 2h --release-header-tmpl=../../.github/release-template.md
args: release --clean --split --timeout 2h --release-header-tmpl=../../.github/release-template.md ${{ steps.nightly-check.outputs.NIGHTLY_FLAG }}
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GOARM: 7 # Default is 6
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_YES: true
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

Expand All @@ -141,7 +166,7 @@ jobs:
if-no-files-found: error

release:
name: ${{ inputs.distribution }} Release
name: Release
runs-on: ${{ inputs.runner_os }}
needs: prepare

Expand Down Expand Up @@ -230,3 +255,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_YES: true
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GORELEASER_PREVIOUS_TAG: ${{ needs.prepare.outputs.GORELEASER_PREVIOUS_TAG }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
14 changes: 7 additions & 7 deletions .github/workflows/ci-goreleaser-core.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI - Core - GoReleaser

on:
merge_group:
merge_group:
push:
branches: [main]
paths:
Expand Down Expand Up @@ -34,12 +34,12 @@ jobs:
secrets: inherit

package-tests:
name: Package tests
needs: check-goreleaser
uses: ./.github/workflows/base-package-tests.yaml
with:
distribution: otelcol
type: '[ "deb", "rpm" ]'
name: Package tests
needs: check-goreleaser
uses: ./.github/workflows/base-package-tests.yaml
with:
distribution: otelcol
type: '[ "deb", "rpm" ]'

msi-tests:
name: MSI tests
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Nightly Release

on:
workflow_dispatch:
schedule:
- cron: "0 2 * * *" # release nightly at 2AM

permissions:
contents: read

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
GORELEASER_PRO_VERSION: v2.7.0

jobs:
nightly-release:
name: Nightly Release
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}

- name: 'Push new tag'
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"

# A previous release was created using a lightweight tag
# git describe by default includes only annotated tags
# git describe --tags includes lightweight tags as well
DESCRIBE=`git tag -l --sort=-v:refname | grep -v nightly | head -n 1`
MAJOR_VERSION=`echo $DESCRIBE | awk '{split($0,a,"."); print a[1]}'`
MINOR_VERSION=`echo $DESCRIBE | awk '{split($0,a,"."); print a[2]}'`
MINOR_VERSION="$((${MINOR_VERSION} + 1))"
TAG="${MAJOR_VERSION}.${MINOR_VERSION}.0-nightly.$(date +'%Y%m%d%H%M')"
git tag -a $TAG -m "$TAG: nightly build"
git push origin $TAG
39 changes: 36 additions & 3 deletions .github/workflows/release-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,52 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Set GORELEASER_PREVIOUS_TAG in actual release
id: prev-tag
if: ${{ !contains(github.ref, '-nightly') }}
# find previous tag by filtering out nightly tags and choosing the
# second to last tag (last one is the current release)
# TODO fix this filter to only filter builder tags
run: |
prev_tag=$(git tag | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1)
echo "GORELEASER_PREVIOUS_TAG=$prev_tag" >> "$GITHUB_OUTPUT"

- name: Set nightly enabled
id: nightly-check
if: ${{ contains(github.ref, '-nightly') }}
run: |
echo "NIGHTLY_FLAG=--nightly" >> "$GITHUB_OUTPUT"

- name: Set COLLECTOR_REF
id: collector-ref
run: |
if [ '${{ contains(github.ref, '-nightly') }}' == 'true' ]; then
echo "COLLECTOR_REF=main" >> "$GITHUB_OUTPUT"
else
echo "COLLECTOR_TAG=${{ github.ref }}" >> "$GITHUB_OUTPUT"
fi

- name: Push cmd/builder Tag
run: |
tag="cmd/builder/${{ github.ref_name }}"
message="Releasing ocb binaries for ${{ github.ref_name }}"
message="Releasing ocb binaries for ${{ steps.collector-ref.outputs.COLLECTOR_REF }}"
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a "${tag}" -m "${message}"
git push origin "${tag}"

- name: Checkout Core Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
repository: "open-telemetry/opentelemetry-collector"
ref: ${{ github.ref_name }}
ref: ${{ steps.collector-ref.outputs.COLLECTOR_REF }}
path: ".core"

- name: Copy Dockerfile to Core Repo directory
run: cp cmd/builder/Dockerfile .core/cmd/builder/Dockerfile

- uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
- uses: anchore/sbom-action/download-syft@7b36ad622f042cab6f59a75c2ac24ccb256e9b45 # v0.20.4
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
Expand All @@ -49,6 +78,7 @@ jobs:
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: "~1.24"

- name: Log into Docker.io
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
Expand All @@ -60,14 +90,17 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
with:
distribution: goreleaser-pro
version: ${{ env.GORELEASER_PRO_VERSION }}
args: release --clean -f cmd/builder/.goreleaser.yml
args: release --clean -f cmd/builder/.goreleaser.yml ${{ steps.nightly-check.outputs.NIGHTLY_FLAG }}
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_YES: true
SKIP_SIGNS: false
GORELEASER_PREVIOUS_TAG: ${{ steps.prev-tag.outputs.GORELEASER_PREVIOUS_TAG }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
2 changes: 2 additions & 0 deletions .github/workflows/release-contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ jobs:
distribution: otelcol-contrib
goos: '[ "linux", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
nightly: ${{ contains(github.ref, '-nightly') }}
secrets: inherit
permissions: write-all
release-windows:
name: Release Contrib (Windows)
if: ${{ !contains(github.ref, '-nightly') }}
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-contrib
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ jobs:
distribution: otelcol
goos: '[ "linux", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
nightly: ${{ contains(github.ref, '-nightly') }}
secrets: inherit
permissions: write-all
release-windows:
name: Release Core (Windows)
if: ${{ !contains(github.ref, '-nightly') }}
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ jobs:
distribution: otelcol-k8s
goos: '[ "linux" ]'
goarch: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
nightly: ${{ contains(github.ref, '-nightly') }}
secrets: inherit
permissions: write-all
release-windows:
name: Release k8s (Windows)
if: ${{ !contains(github.ref, '-nightly') }}
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-k8s
Expand Down
39 changes: 36 additions & 3 deletions .github/workflows/release-opampsupervisor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,52 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Set GORELEASER_PREVIOUS_TAG in actual release
id: prev-tag
if: ${{ !contains(github.ref, '-nightly') }}
# find previous tag by filtering out nightly tags and choosing the
# second to last tag (last one is the current release)
# TODO fix this filter to only filter builder tags
run: |
prev_tag=$(git tag | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1)
echo "GORELEASER_PREVIOUS_TAG=$prev_tag" >> "$GITHUB_OUTPUT"

- name: Set nightly enabled
id: nightly-check
if: ${{ contains(github.ref, '-nightly') }}
run: |
echo "NIGHTLY_FLAG=--nightly" >> "$GITHUB_OUTPUT"

- name: Set COLLECTOR_REF
id: collector-ref
run: |
if [ '${{ contains(github.ref, '-nightly') }}' == 'true' ]; then
echo "COLLECTOR_REF=main" >> "$GITHUB_OUTPUT"
else
echo "COLLECTOR_TAG=${{ github.ref }}" >> "$GITHUB_OUTPUT"
fi

- name: Push cmd/opampsupervisor Tag
run: |
tag="cmd/opampsupervisor/${{ github.ref_name }}"
message="Releasing OpAMP supervisor binaries for ${{ github.ref_name }}"
message="Releasing OpAMP supervisor binaries for ${{ steps.collector-ref.outputs.COLLECTOR_REF }}"
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a "${tag}" -m "${message}"
git push origin "${tag}"

- name: Checkout Contrib Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
repository: "open-telemetry/opentelemetry-collector-contrib"
ref: ${{ github.ref_name }}
ref: ${{ steps.collector-ref.outputs.COLLECTOR_REF }}
path: ".contrib"

- name: Copy Dockerfile to Contrib Repo directory
run: cp cmd/opampsupervisor/Dockerfile .contrib/cmd/opampsupervisor/Dockerfile

- uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
- uses: anchore/sbom-action/download-syft@7b36ad622f042cab6f59a75c2ac24ccb256e9b45 # v0.20.4
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
Expand All @@ -49,6 +78,7 @@ jobs:
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: "~1.24"

- name: Log into Docker.io
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
Expand All @@ -60,14 +90,17 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
with:
distribution: goreleaser-pro
version: ${{ env.GORELEASER_PRO_VERSION }}
args: release --clean -f cmd/opampsupervisor/.goreleaser.yml
args: release --clean -f cmd/opampsupervisor/.goreleaser.yml ${{ steps.nightly-check.outputs.NIGHTLY_FLAG }}
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_YES: true
SKIP_SIGNS: false
GORELEASER_PREVIOUS_TAG: ${{ steps.prev-tag.outputs.GORELEASER_PREVIOUS_TAG }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
2 changes: 2 additions & 0 deletions .github/workflows/release-otlp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ jobs:
distribution: otelcol-otlp
goos: '[ "linux", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
nightly: ${{ contains(github.ref, '-nightly') }}
secrets: inherit
permissions: write-all
release-windows:
name: Release OTLP (Windows)
if: ${{ !contains(github.ref, '-nightly') }}
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-otlp
Expand Down
Loading