diff --git a/.github/workflows/base-ci-goreleaser.yaml b/.github/workflows/base-ci-goreleaser.yaml index 451b28c2..d583f139 100644 --- a/.github/workflows/base-ci-goreleaser.yaml +++ b/.github/workflows/base-ci-goreleaser.yaml @@ -9,7 +9,6 @@ on: jobs: check-goreleaser: - name: Check GoReleaser Configuration for ${{ inputs.distribution }} strategy: matrix: GOOS: [ linux, windows, darwin ] @@ -57,7 +56,8 @@ jobs: with: distribution: goreleaser-pro version: latest - args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h --split --id ${{ inputs.distribution }} + workdir: distributions/${{ inputs.distribution }} + args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h --split env: GOOS: ${{ matrix.GOOS }} GOARCH: ${{ matrix.GOARCH }} diff --git a/.github/workflows/base-release.yaml b/.github/workflows/base-release.yaml index c7bbad50..05b56c8f 100644 --- a/.github/workflows/base-release.yaml +++ b/.github/workflows/base-release.yaml @@ -9,7 +9,6 @@ on: jobs: prepare: - name: Prepare ${{ inputs.distribution }} Release strategy: matrix: GOOS: [linux, windows, darwin] @@ -74,7 +73,8 @@ jobs: with: distribution: goreleaser-pro version: latest - args: release --clean --split --timeout 2h --id ${{ inputs.distribution }} + workdir: distributions/${{ inputs.distribution }} + args: release --clean --split --timeout 2h env: GOOS: ${{ matrix.GOOS }} GOARCH: ${{ matrix.GOARCH }} @@ -137,6 +137,7 @@ jobs: with: distribution: goreleaser-pro version: latest + workdir: distributions/${{ inputs.distribution }} args: continue --merge --timeout 2h env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci-goreleaser-contrib.yaml b/.github/workflows/ci-goreleaser-contrib.yaml index 1ff3c4ab..b0562ccf 100644 --- a/.github/workflows/ci-goreleaser-contrib.yaml +++ b/.github/workflows/ci-goreleaser-contrib.yaml @@ -4,13 +4,11 @@ on: push: branches: [main] paths: - - ".goreleaser.yaml" - - "distributions/otelcol-contrib/manifest.yaml" + - "distributions/otelcol-contrib/**" pull_request: branches: [main] paths: - - ".goreleaser.yaml" - - "distributions/otelcol-contrib/manifest.yaml" + - "distributions/otelcol-contrib/**" jobs: check-goreleaser: diff --git a/.github/workflows/ci-goreleaser-core.yaml b/.github/workflows/ci-goreleaser-core.yaml index 5548ce26..d9abff4e 100644 --- a/.github/workflows/ci-goreleaser-core.yaml +++ b/.github/workflows/ci-goreleaser-core.yaml @@ -4,13 +4,11 @@ on: push: branches: [main] paths: - - ".goreleaser.yaml" - - "distributions/otelcol/manifest.yaml" + - "distributions/otelcol/**" pull_request: branches: [main] paths: - - ".goreleaser.yaml" - - "distributions/otelcol/manifest.yaml" + - "distributions/otelcol/**" jobs: diff --git a/.goreleaser.yaml b/.goreleaser.yaml deleted file mode 100644 index 09b3d592..00000000 --- a/.goreleaser.yaml +++ /dev/null @@ -1,480 +0,0 @@ -partial: - by: target -project_name: opentelemetry-collector-releases -env: - - COSIGN_YES=true -builds: - - id: otelcol - goos: - - darwin - - linux - - windows - goarch: - - "386" - - amd64 - - arm - - arm64 - - ppc64le - - s390x - goarm: - - "7" - ignore: - - goos: darwin - goarch: "386" - - goos: darwin - goarch: arm - - goos: darwin - goarch: s390x - - goos: windows - goarch: arm - - goos: windows - goarch: arm64 - - goos: windows - goarch: s390x - dir: distributions/otelcol/_build - binary: otelcol - ldflags: - - -s - - -w - flags: - - -trimpath - env: - - CGO_ENABLED=0 - - id: otelcol-contrib - goos: - - darwin - - linux - - windows - goarch: - - "386" - - amd64 - - arm - - arm64 - - ppc64le - - s390x - goarm: - - "7" - ignore: - - goos: darwin - goarch: "386" - - goos: darwin - goarch: arm - - goos: darwin - goarch: s390x - - goos: windows - goarch: arm - - goos: windows - goarch: arm64 - - goos: windows - goarch: s390x - dir: distributions/otelcol-contrib/_build - binary: otelcol-contrib - ldflags: - - -s - - -w - flags: - - -trimpath - env: - - CGO_ENABLED=0 -archives: - - id: otelcol - builds: - - otelcol - name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}' - - id: otelcol-contrib - builds: - - otelcol-contrib - name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}' -nfpms: - - package_name: otelcol - contents: - - src: distributions/otelcol/otelcol.service - dst: /lib/systemd/system/otelcol.service - - src: distributions/otelcol/otelcol.conf - dst: /etc/otelcol/otelcol.conf - type: config|noreplace - - src: configs/otelcol.yaml - dst: /etc/otelcol/config.yaml - type: config - scripts: - preinstall: distributions/otelcol/preinstall.sh - postinstall: distributions/otelcol/postinstall.sh - preremove: distributions/otelcol/preremove.sh - id: otelcol - builds: - - otelcol - formats: - - apk - - deb - - rpm - maintainer: The OpenTelemetry Collector maintainers - description: OpenTelemetry Collector - otelcol - license: Apache 2.0 - - package_name: otelcol-contrib - contents: - - src: distributions/otelcol-contrib/otelcol-contrib.service - dst: /lib/systemd/system/otelcol-contrib.service - - src: distributions/otelcol-contrib/otelcol-contrib.conf - dst: /etc/otelcol-contrib/otelcol-contrib.conf - type: config|noreplace - - src: configs/otelcol-contrib.yaml - dst: /etc/otelcol-contrib/config.yaml - type: config - scripts: - preinstall: distributions/otelcol-contrib/preinstall.sh - postinstall: distributions/otelcol-contrib/postinstall.sh - preremove: distributions/otelcol-contrib/preremove.sh - id: otelcol-contrib - builds: - - otelcol-contrib - formats: - - apk - - deb - - rpm - maintainer: The OpenTelemetry Collector maintainers - description: OpenTelemetry Collector - otelcol-contrib - license: Apache 2.0 -checksum: - name_template: '{{ .ProjectName }}_checksums.txt' -dockers: - - ids: - - otelcol - goos: linux - goarch: "386" - dockerfile: distributions/otelcol/Dockerfile - image_templates: - - otel/opentelemetry-collector:{{ .Version }}-386 - - otel/opentelemetry-collector:latest-386 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-386 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-386 - extra_files: - - configs/otelcol.yaml - build_flag_templates: - - --pull - - --platform=linux/386 - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol - goos: linux - goarch: amd64 - dockerfile: distributions/otelcol/Dockerfile - image_templates: - - otel/opentelemetry-collector:{{ .Version }}-amd64 - - otel/opentelemetry-collector:latest-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-amd64 - extra_files: - - configs/otelcol.yaml - build_flag_templates: - - --pull - - --platform=linux/amd64 - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol - goos: linux - goarch: arm - goarm: "7" - dockerfile: distributions/otelcol/Dockerfile - image_templates: - - otel/opentelemetry-collector:{{ .Version }}-armv7 - - otel/opentelemetry-collector:latest-armv7 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-armv7 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-armv7 - extra_files: - - configs/otelcol.yaml - build_flag_templates: - - --pull - - --platform=linux/arm/v7 - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol - goos: linux - goarch: arm64 - dockerfile: distributions/otelcol/Dockerfile - image_templates: - - otel/opentelemetry-collector:{{ .Version }}-arm64 - - otel/opentelemetry-collector:latest-arm64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-arm64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-arm64 - extra_files: - - configs/otelcol.yaml - build_flag_templates: - - --pull - - --platform=linux/arm64 - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol - goos: linux - goarch: ppc64le - dockerfile: distributions/otelcol/Dockerfile - image_templates: - - otel/opentelemetry-collector:{{ .Version }}-ppc64le - - otel/opentelemetry-collector:latest-ppc64le - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-ppc64le - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-ppc64le - extra_files: - - configs/otelcol.yaml - build_flag_templates: - - --pull - - --platform=linux/ppc64le - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol - goos: linux - goarch: s390x - dockerfile: distributions/otelcol/Dockerfile - image_templates: - - otel/opentelemetry-collector:{{ .Version }}-s390x - - otel/opentelemetry-collector:latest-s390x - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-s390x - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-s390x - extra_files: - - configs/otelcol.yaml - build_flag_templates: - - --pull - - --platform=linux/s390x - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol-contrib - goos: linux - goarch: "386" - dockerfile: distributions/otelcol-contrib/Dockerfile - image_templates: - - otel/opentelemetry-collector-contrib:{{ .Version }}-386 - - otel/opentelemetry-collector-contrib:latest-386 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-386 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-386 - extra_files: - - configs/otelcol-contrib.yaml - build_flag_templates: - - --pull - - --platform=linux/386 - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol-contrib - goos: linux - goarch: amd64 - dockerfile: distributions/otelcol-contrib/Dockerfile - image_templates: - - otel/opentelemetry-collector-contrib:{{ .Version }}-amd64 - - otel/opentelemetry-collector-contrib:latest-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 - extra_files: - - configs/otelcol-contrib.yaml - build_flag_templates: - - --pull - - --platform=linux/amd64 - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol-contrib - goos: linux - goarch: arm - goarm: "7" - dockerfile: distributions/otelcol-contrib/Dockerfile - image_templates: - - otel/opentelemetry-collector-contrib:{{ .Version }}-armv7 - - otel/opentelemetry-collector-contrib:latest-armv7 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-armv7 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-armv7 - extra_files: - - configs/otelcol-contrib.yaml - build_flag_templates: - - --pull - - --platform=linux/arm/v7 - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol-contrib - goos: linux - goarch: arm64 - dockerfile: distributions/otelcol-contrib/Dockerfile - image_templates: - - otel/opentelemetry-collector-contrib:{{ .Version }}-arm64 - - otel/opentelemetry-collector-contrib:latest-arm64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 - extra_files: - - configs/otelcol-contrib.yaml - build_flag_templates: - - --pull - - --platform=linux/arm64 - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol-contrib - goos: linux - goarch: ppc64le - dockerfile: distributions/otelcol-contrib/Dockerfile - image_templates: - - otel/opentelemetry-collector-contrib:{{ .Version }}-ppc64le - - otel/opentelemetry-collector-contrib:latest-ppc64le - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-ppc64le - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-ppc64le - extra_files: - - configs/otelcol-contrib.yaml - build_flag_templates: - - --pull - - --platform=linux/ppc64le - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx - - ids: - - otelcol-contrib - goos: linux - goarch: s390x - dockerfile: distributions/otelcol-contrib/Dockerfile - image_templates: - - otel/opentelemetry-collector-contrib:{{ .Version }}-s390x - - otel/opentelemetry-collector-contrib:latest-s390x - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-s390x - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-s390x - extra_files: - - configs/otelcol-contrib.yaml - build_flag_templates: - - --pull - - --platform=linux/s390x - - --label=org.opencontainers.image.created={{.Date}} - - --label=org.opencontainers.image.name={{.ProjectName}} - - --label=org.opencontainers.image.revision={{.FullCommit}} - - --label=org.opencontainers.image.version={{.Version}} - - --label=org.opencontainers.image.source={{.GitURL}} - use: buildx -docker_manifests: - - name_template: otel/opentelemetry-collector:{{ .Version }} - image_templates: - - otel/opentelemetry-collector:{{ .Version }}-386 - - otel/opentelemetry-collector:{{ .Version }}-amd64 - - otel/opentelemetry-collector:{{ .Version }}-armv7 - - otel/opentelemetry-collector:{{ .Version }}-arm64 - - otel/opentelemetry-collector:{{ .Version }}-ppc64le - - otel/opentelemetry-collector:{{ .Version }}-s390x - - name_template: otel/opentelemetry-collector:latest - image_templates: - - otel/opentelemetry-collector:latest-386 - - otel/opentelemetry-collector:latest-amd64 - - otel/opentelemetry-collector:latest-armv7 - - otel/opentelemetry-collector:latest-arm64 - - otel/opentelemetry-collector:latest-ppc64le - - otel/opentelemetry-collector:latest-s390x - - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }} - image_templates: - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-386 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-armv7 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-arm64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-ppc64le - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-s390x - - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest - image_templates: - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-386 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-armv7 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-arm64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-ppc64le - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-s390x - - name_template: otel/opentelemetry-collector-contrib:{{ .Version }} - image_templates: - - otel/opentelemetry-collector-contrib:{{ .Version }}-386 - - otel/opentelemetry-collector-contrib:{{ .Version }}-amd64 - - otel/opentelemetry-collector-contrib:{{ .Version }}-armv7 - - otel/opentelemetry-collector-contrib:{{ .Version }}-arm64 - - otel/opentelemetry-collector-contrib:{{ .Version }}-ppc64le - - otel/opentelemetry-collector-contrib:{{ .Version }}-s390x - - name_template: otel/opentelemetry-collector-contrib:latest - image_templates: - - otel/opentelemetry-collector-contrib:latest-386 - - otel/opentelemetry-collector-contrib:latest-amd64 - - otel/opentelemetry-collector-contrib:latest-armv7 - - otel/opentelemetry-collector-contrib:latest-arm64 - - otel/opentelemetry-collector-contrib:latest-ppc64le - - otel/opentelemetry-collector-contrib:latest-s390x - - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }} - image_templates: - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-386 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-armv7 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-ppc64le - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-s390x - - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest - image_templates: - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-386 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-armv7 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-ppc64le - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-s390x -signs: - - cmd: cosign - args: - - sign-blob - - --output-signature - - ${artifact}.sig - - --output-certificate - - ${artifact}.pem - - ${artifact} - signature: ${artifact}.sig - artifacts: all - certificate: ${artifact}.pem -docker_signs: - - args: - - sign - - ${artifact} - artifacts: all -sboms: - - id: archive - artifacts: archive - - id: package - artifacts: package diff --git a/configs/README.md b/configs/README.md deleted file mode 100644 index a3cec2bf..00000000 --- a/configs/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This file contains the default configuration files for the container images. Due to a problem with goreleaser, these cannot be in the a directory with the same name as the binary for that image. For intance, if the binary is `opentelemetry-collector`, the container image cannot include anything from a directory named `opentelemetry-collector`, which is exactly what we have. - -This problem is solvable in a better way, but for now, storing the configs in this directory is the simplest solution that works. diff --git a/distributions/otelcol-contrib/.goreleaser.yaml b/distributions/otelcol-contrib/.goreleaser.yaml new file mode 100644 index 00000000..b0e081e8 --- /dev/null +++ b/distributions/otelcol-contrib/.goreleaser.yaml @@ -0,0 +1,245 @@ +partial: + by: target +project_name: opentelemetry-collector-releases +env: + - COSIGN_YES=true +builds: + - id: otelcol-contrib + goos: + - darwin + - linux + - windows + goarch: + - "386" + - amd64 + - arm + - arm64 + - ppc64le + - s390x + goarm: + - "7" + ignore: + - goos: darwin + goarch: "386" + - goos: darwin + goarch: arm + - goos: darwin + goarch: s390x + - goos: windows + goarch: arm + - goos: windows + goarch: arm64 + - goos: windows + goarch: s390x + dir: _build + binary: otelcol-contrib + ldflags: + - -s + - -w + flags: + - -trimpath + env: + - CGO_ENABLED=0 +archives: + - id: otelcol-contrib + builds: + - otelcol-contrib + name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}' +nfpms: + - package_name: otelcol-contrib + contents: + - src: otelcol-contrib.service + dst: /lib/systemd/system/otelcol-contrib.service + - src: otelcol-contrib.conf + dst: /etc/otelcol-contrib/otelcol-contrib.conf + type: config|noreplace + - src: config.yaml + dst: /etc/otelcol-contrib/config.yaml + type: config + scripts: + preinstall: preinstall.sh + postinstall: postinstall.sh + preremove: preremove.sh + id: otelcol-contrib + builds: + - otelcol-contrib + formats: + - apk + - deb + - rpm + maintainer: The OpenTelemetry Collector maintainers + description: OpenTelemetry Collector - otelcol-contrib + license: Apache 2.0 +checksum: + name_template: '{{ .ProjectName }}_otelcol-contrib_checksums.txt' +dockers: + - goos: linux + goarch: "386" + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector-contrib:{{ .Version }}-386 + - otel/opentelemetry-collector-contrib:latest-386 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-386 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-386 + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/386 + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx + - goos: linux + goarch: amd64 + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector-contrib:{{ .Version }}-amd64 + - otel/opentelemetry-collector-contrib:latest-amd64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/amd64 + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx + - goos: linux + goarch: arm + goarm: "7" + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector-contrib:{{ .Version }}-armv7 + - otel/opentelemetry-collector-contrib:latest-armv7 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-armv7 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-armv7 + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/arm/v7 + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx + - goos: linux + goarch: arm64 + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector-contrib:{{ .Version }}-arm64 + - otel/opentelemetry-collector-contrib:latest-arm64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/arm64 + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx + - goos: linux + goarch: ppc64le + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector-contrib:{{ .Version }}-ppc64le + - otel/opentelemetry-collector-contrib:latest-ppc64le + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-ppc64le + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-ppc64le + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/ppc64le + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx + - goos: linux + goarch: s390x + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector-contrib:{{ .Version }}-s390x + - otel/opentelemetry-collector-contrib:latest-s390x + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-s390x + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-s390x + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/s390x + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx +docker_manifests: + - name_template: otel/opentelemetry-collector-contrib:{{ .Version }} + image_templates: + - otel/opentelemetry-collector-contrib:{{ .Version }}-386 + - otel/opentelemetry-collector-contrib:{{ .Version }}-amd64 + - otel/opentelemetry-collector-contrib:{{ .Version }}-armv7 + - otel/opentelemetry-collector-contrib:{{ .Version }}-arm64 + - otel/opentelemetry-collector-contrib:{{ .Version }}-ppc64le + - otel/opentelemetry-collector-contrib:{{ .Version }}-s390x + - name_template: otel/opentelemetry-collector-contrib:latest + image_templates: + - otel/opentelemetry-collector-contrib:latest-386 + - otel/opentelemetry-collector-contrib:latest-amd64 + - otel/opentelemetry-collector-contrib:latest-armv7 + - otel/opentelemetry-collector-contrib:latest-arm64 + - otel/opentelemetry-collector-contrib:latest-ppc64le + - otel/opentelemetry-collector-contrib:latest-s390x + - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }} + image_templates: + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-386 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-armv7 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-ppc64le + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-s390x + - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest + image_templates: + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-386 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-armv7 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-ppc64le + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-s390x +signs: + - cmd: cosign + args: + - sign-blob + - --output-signature + - ${artifact}.sig + - --output-certificate + - ${artifact}.pem + - ${artifact} + signature: ${artifact}.sig + artifacts: all + certificate: ${artifact}.pem +docker_signs: + - args: + - sign + - ${artifact} + artifacts: all +sboms: + - id: archive + artifacts: archive + - id: package + artifacts: package diff --git a/distributions/otelcol-contrib/Dockerfile b/distributions/otelcol-contrib/Dockerfile index aeb90975..28d10223 100644 --- a/distributions/otelcol-contrib/Dockerfile +++ b/distributions/otelcol-contrib/Dockerfile @@ -8,7 +8,7 @@ USER ${USER_UID} COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --chmod=755 otelcol-contrib /otelcol-contrib -COPY configs/otelcol-contrib.yaml /etc/otelcol-contrib/config.yaml +COPY config.yaml /etc/otelcol-contrib/config.yaml ENTRYPOINT ["/otelcol-contrib"] CMD ["--config", "/etc/otelcol-contrib/config.yaml"] EXPOSE 4317 55678 55679 diff --git a/configs/otelcol-contrib.yaml b/distributions/otelcol-contrib/config.yaml similarity index 100% rename from configs/otelcol-contrib.yaml rename to distributions/otelcol-contrib/config.yaml diff --git a/distributions/otelcol-contrib/manifest.yaml b/distributions/otelcol-contrib/manifest.yaml index 74d6f1ea..0243e743 100644 --- a/distributions/otelcol-contrib/manifest.yaml +++ b/distributions/otelcol-contrib/manifest.yaml @@ -2,7 +2,7 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-releases/contrib name: otelcol-contrib description: OpenTelemetry Collector Contrib - version: 0.95.0 + version: 0.95.1 output_path: ./_build otelcol_version: 0.95.0 diff --git a/distributions/otelcol/.goreleaser.yaml b/distributions/otelcol/.goreleaser.yaml new file mode 100644 index 00000000..c9b23156 --- /dev/null +++ b/distributions/otelcol/.goreleaser.yaml @@ -0,0 +1,245 @@ +partial: + by: target +project_name: opentelemetry-collector-releases +env: + - COSIGN_YES=true +builds: + - id: otelcol + goos: + - darwin + - linux + - windows + goarch: + - "386" + - amd64 + - arm + - arm64 + - ppc64le + - s390x + goarm: + - "7" + ignore: + - goos: darwin + goarch: "386" + - goos: darwin + goarch: arm + - goos: darwin + goarch: s390x + - goos: windows + goarch: arm + - goos: windows + goarch: arm64 + - goos: windows + goarch: s390x + dir: _build + binary: otelcol + ldflags: + - -s + - -w + flags: + - -trimpath + env: + - CGO_ENABLED=0 +archives: + - id: otelcol + builds: + - otelcol + name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}' +nfpms: + - package_name: otelcol + contents: + - src: otelcol.service + dst: /lib/systemd/system/otelcol.service + - src: otelcol.conf + dst: /etc/otelcol/otelcol.conf + type: config|noreplace + - src: config.yaml + dst: /etc/otelcol/config.yaml + type: config + scripts: + preinstall: preinstall.sh + postinstall: postinstall.sh + preremove: preremove.sh + id: otelcol + builds: + - otelcol + formats: + - apk + - deb + - rpm + maintainer: The OpenTelemetry Collector maintainers + description: OpenTelemetry Collector - otelcol + license: Apache 2.0 +checksum: + name_template: '{{ .ProjectName }}_otelcol_checksums.txt' +dockers: + - goos: linux + goarch: "386" + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector:{{ .Version }}-386 + - otel/opentelemetry-collector:latest-386 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-386 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-386 + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/386 + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx + - goos: linux + goarch: amd64 + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector:{{ .Version }}-amd64 + - otel/opentelemetry-collector:latest-amd64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-amd64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-amd64 + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/amd64 + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx + - goos: linux + goarch: arm + goarm: "7" + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector:{{ .Version }}-armv7 + - otel/opentelemetry-collector:latest-armv7 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-armv7 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-armv7 + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/arm/v7 + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx + - goos: linux + goarch: arm64 + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector:{{ .Version }}-arm64 + - otel/opentelemetry-collector:latest-arm64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-arm64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-arm64 + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/arm64 + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx + - goos: linux + goarch: ppc64le + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector:{{ .Version }}-ppc64le + - otel/opentelemetry-collector:latest-ppc64le + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-ppc64le + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-ppc64le + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/ppc64le + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx + - goos: linux + goarch: s390x + dockerfile: Dockerfile + image_templates: + - otel/opentelemetry-collector:{{ .Version }}-s390x + - otel/opentelemetry-collector:latest-s390x + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-s390x + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-s390x + extra_files: + - config.yaml + build_flag_templates: + - --pull + - --platform=linux/s390x + - --label=org.opencontainers.image.created={{.Date}} + - --label=org.opencontainers.image.name={{.ProjectName}} + - --label=org.opencontainers.image.revision={{.FullCommit}} + - --label=org.opencontainers.image.version={{.Version}} + - --label=org.opencontainers.image.source={{.GitURL}} + use: buildx +docker_manifests: + - name_template: otel/opentelemetry-collector:{{ .Version }} + image_templates: + - otel/opentelemetry-collector:{{ .Version }}-386 + - otel/opentelemetry-collector:{{ .Version }}-amd64 + - otel/opentelemetry-collector:{{ .Version }}-armv7 + - otel/opentelemetry-collector:{{ .Version }}-arm64 + - otel/opentelemetry-collector:{{ .Version }}-ppc64le + - otel/opentelemetry-collector:{{ .Version }}-s390x + - name_template: otel/opentelemetry-collector:latest + image_templates: + - otel/opentelemetry-collector:latest-386 + - otel/opentelemetry-collector:latest-amd64 + - otel/opentelemetry-collector:latest-armv7 + - otel/opentelemetry-collector:latest-arm64 + - otel/opentelemetry-collector:latest-ppc64le + - otel/opentelemetry-collector:latest-s390x + - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }} + image_templates: + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-386 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-amd64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-armv7 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-arm64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-ppc64le + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-s390x + - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest + image_templates: + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-386 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-amd64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-armv7 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-arm64 + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-ppc64le + - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-s390x +signs: + - cmd: cosign + args: + - sign-blob + - --output-signature + - ${artifact}.sig + - --output-certificate + - ${artifact}.pem + - ${artifact} + signature: ${artifact}.sig + artifacts: all + certificate: ${artifact}.pem +docker_signs: + - args: + - sign + - ${artifact} + artifacts: all +sboms: + - id: archive + artifacts: archive + - id: package + artifacts: package diff --git a/distributions/otelcol/Dockerfile b/distributions/otelcol/Dockerfile index c3160d83..eb79e5dc 100644 --- a/distributions/otelcol/Dockerfile +++ b/distributions/otelcol/Dockerfile @@ -8,7 +8,7 @@ USER ${USER_UID} COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY --chmod=755 otelcol /otelcol -COPY configs/otelcol.yaml /etc/otelcol/config.yaml +COPY config.yaml /etc/otelcol/config.yaml ENTRYPOINT ["/otelcol"] CMD ["--config", "/etc/otelcol/config.yaml"] EXPOSE 4317 55678 55679 diff --git a/configs/otelcol.yaml b/distributions/otelcol/config.yaml similarity index 100% rename from configs/otelcol.yaml rename to distributions/otelcol/config.yaml diff --git a/distributions/otelcol/manifest.yaml b/distributions/otelcol/manifest.yaml index 275847dd..bb5e1f4c 100644 --- a/distributions/otelcol/manifest.yaml +++ b/distributions/otelcol/manifest.yaml @@ -2,7 +2,7 @@ dist: module: github.com/open-telemetry/opentelemetry-collector-releases/core name: otelcol description: OpenTelemetry Collector - version: 0.95.0 + version: 0.95.1 output_path: ./_build otelcol_version: 0.95.0