Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 25 additions & 0 deletions .chloggen/add_windows_container_images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: packaging

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Start producing container images for Windows 2019 and 2022 on amd64

# One or more tracking issues or pull requests related to the change
issues: [339]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
75 changes: 54 additions & 21 deletions .github/workflows/base-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
goarch:
required: true
type: string
runner_os:
required: false
type: string
default: ubuntu-24.04

env:
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
Expand All @@ -21,26 +25,18 @@ jobs:
prepare:
strategy:
matrix:
GOOS: ${{ fromJSON( inputs.goos) }}
GOARCH: ${{ fromJSON( inputs.goarch) }}
GOOS: ${{ fromJSON(inputs.goos) }}
GOARCH: ${{ fromJSON(inputs.goarch) }}
exclude:
- GOOS: darwin
GOARCH: "386"
- GOOS: darwin
GOARCH: s390x
- GOOS: windows
GOARCH: arm64
- GOOS: darwin
GOARCH: arm
- GOOS: windows
GOARCH: arm
- GOOS: windows
GOARCH: s390x
- GOOS: darwin
GOARCH: ppc64le
- GOOS: windows
GOARCH: ppc64le
runs-on: ubuntu-24.04
- GOOS: darwin
GOARCH: arm
runs-on: ${{ inputs.runner_os }}

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -52,22 +48,28 @@ jobs:
- uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0

- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
if: runner.os != 'Windows'
with:
platforms: arm64,ppc64le,linux/arm/v7,s390x

- uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
if: runner.os != 'Windows'

# Fix slow Go compile and cache restore
# See https://github.com/actions/setup-go/pull/515
- name: Fix slow setup-go cache restore in Windows
if: runner.os == 'Windows'
run: |
echo "GOCACHE=D:\gocache" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "GOMODCACHE=D:\gomodcache" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "GOTMPDIR=D:\gotmp" | Out-File -FilePath $env:GITHUB_ENV -Append
mkdir D:\gotmp

- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: "~1.24"
check-latest: true

- name: Setup wixl # Required to build MSI packages for Windows
if: ${{ matrix.GOOS == 'windows' && ( matrix.GOARCH == '386' || matrix.GOARCH == 'amd64') }}
run: |
sudo apt-get update
sudo apt-get install -y wixl

- name: Generate distribution sources
run: make generate-sources

Expand All @@ -90,6 +92,7 @@ jobs:

- name: Create artifacts directory to store build artifacts
if: inputs.distribution == 'otelcol-contrib'
shell: bash
run: mkdir -p distributions/otelcol-contrib/artifacts

# otelcol-contrib is built in a separate stage
Expand All @@ -113,10 +116,12 @@ jobs:

- name: Move built artifacts
if: inputs.distribution == 'otelcol-contrib'
shell: bash
run: mv distributions/otelcol-contrib/dist/**/* distributions/otelcol-contrib/artifacts/

- name: Show built or downloaded content
if: inputs.distribution == 'otelcol-contrib'
shell: bash
run: ls -laR distributions/otelcol-contrib/artifacts

- uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
Expand All @@ -141,7 +146,7 @@ jobs:

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

permissions:
Expand All @@ -159,23 +164,51 @@ jobs:
- uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0

- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
if: runner.os != 'Windows'
with:
platforms: arm64,ppc64le,s390x

- uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
if: runner.os != 'Windows'

# Fix slow Go compile and cache restore
# See https://github.com/actions/setup-go/pull/515
- name: Fix slow setup-go cache restore in Windows
if: runner.os == 'Windows'
run: |
echo "GOCACHE=D:\gocache" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "GOMODCACHE=D:\gomodcache" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "GOTMPDIR=D:\gotmp" | Out-File -FilePath $env:GITHUB_ENV -Append
mkdir D:\gotmp

- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: "~1.24"
check-latest: true

- uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
if: runner.os == 'Windows'
with:
pattern: artifacts-${{ inputs.distribution }}-windows-*
path: distributions/${{ inputs.distribution }}/dist
merge-multiple: true

- uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
if: runner.os != 'Windows'
with:
pattern: artifacts-${{ inputs.distribution }}-darwin-*
path: distributions/${{ inputs.distribution }}/dist
merge-multiple: true

- uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
if: runner.os != 'Windows'
with:
pattern: artifacts-${{ inputs.distribution }}-*
pattern: artifacts-${{ inputs.distribution }}-linux-*
path: distributions/${{ inputs.distribution }}/dist
merge-multiple: true

- name: Display structure of downloaded files
shell: bash
run: ls -R distributions/${{ inputs.distribution }}/dist

- name: Log into Docker.io
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/release-contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ jobs:
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-contrib
goos: '[ "linux", "windows", "darwin" ]'
goos: '[ "linux", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
secrets: inherit
permissions: write-all
release-windows:
name: Release Contrib (Windows)
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-contrib
goos: '[ "windows" ]'
goarch: '[ "386", "amd64" ]'
runner_os: windows-2022
secrets: inherit
permissions: write-all
12 changes: 11 additions & 1 deletion .github/workflows/release-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ jobs:
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol
goos: '[ "linux", "windows", "darwin" ]'
goos: '[ "linux", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
secrets: inherit
permissions: write-all
release-windows:
name: Release Core (Windows)
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol
goos: '[ "windows" ]'
goarch: '[ "386", "amd64" ]'
runner_os: windows-2022
secrets: inherit
permissions: write-all
10 changes: 10 additions & 0 deletions .github/workflows/release-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,13 @@ jobs:
goarch: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
secrets: inherit
permissions: write-all
release-windows:
name: Release k8s (Windows)
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-k8s
goos: '[ "windows" ]'
goarch: '[ "386", "amd64" ]'
runner_os: windows-2022
secrets: inherit
permissions: write-all
12 changes: 11 additions & 1 deletion .github/workflows/release-otlp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ jobs:
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-otlp
goos: '[ "linux", "windows", "darwin" ]'
goos: '[ "linux", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
secrets: inherit
permissions: write-all
release-windows:
name: Release OTLP (Windows)
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-otlp
goos: '[ "windows" ]'
goarch: '[ "386", "amd64" ]'
runner_os: windows-2022
secrets: inherit
permissions: write-all
Loading