diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml index e41729a9..e31c4b99 100644 --- a/.github/workflows/ci-goreleaser.yaml +++ b/.github/workflows/ci-goreleaser.yaml @@ -19,21 +19,7 @@ jobs: name: Check GoReleaser Configuration strategy: matrix: - GOOS: [linux, windows, darwin] - GOARCH: ["386", amd64, arm64, ppc64le, arm, s390x] - 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: [linux] runs-on: ubuntu-20.04 steps: @@ -45,7 +31,7 @@ jobs: - name: Setup QEMU uses: docker/setup-qemu-action@v3 with: - platforms: arm64,ppc64le,linux/arm/v7,s390x + platforms: arm64 - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 @@ -62,10 +48,8 @@ jobs: - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: - distribution: goreleaser-pro - version: latest - args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h --split + distribution: goreleaser + version: v1.24.0 + args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h env: GOOS: ${{ matrix.GOOS }} - GOARCH: ${{ matrix.GOARCH }} - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 34e230a9..bae3a1d9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,24 +5,15 @@ on: tags: ["v*"] jobs: - prepare: + Release: + permissions: + id-token: write + packages: write + contents: write + strategy: matrix: - GOOS: [linux, windows, darwin] - GOARCH: ["386", amd64, arm64, ppc64le, arm, s390x] - 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: [linux] runs-on: ubuntu-20.04 steps: @@ -34,7 +25,7 @@ jobs: - uses: docker/setup-qemu-action@v3 with: - platforms: arm64,ppc64le,linux/arm/v7,s390x + platforms: arm64 - uses: docker/setup-buildx-action@v3 @@ -46,12 +37,6 @@ jobs: - name: Generate distribution sources run: make generate-sources - - name: Log into Docker.io - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Login to GitHub Package Registry uses: docker/login-action@v3 with: @@ -64,75 +49,16 @@ jobs: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - uses: goreleaser/goreleaser-action@v5 - if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit with: - distribution: goreleaser-pro - version: latest - args: release --clean --split --timeout 2h + distribution: goreleaser + version: v1.24.0 + args: release --clean --timeout 2h env: GOOS: ${{ matrix.GOOS }} - GOARCH: ${{ matrix.GOARCH }} - GITHUB_TOKEN: ${{ secrets.GH_PAT }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COSIGN_EXPERIMENTAL: true - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: all-artifacts path: dist/*/* - - release: - name: Release - runs-on: ubuntu-20.04 - needs: prepare - - permissions: - id-token: write - packages: write - contents: write - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: sigstore/cosign-installer@v2 - - - uses: anchore/sbom-action/download-syft@v0.15.8 - - - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64,ppc64le,s390x - - - uses: docker/setup-buildx-action@v3 - - - uses: actions/setup-go@v5 - with: - go-version: '~1.21.7' - check-latest: true - - - uses: actions/download-artifact@v3 - with: - name: all-artifacts - path: dist - - - name: Log into Docker.io - run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - uses: goreleaser/goreleaser-action@v5 - if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit - with: - distribution: goreleaser-pro - version: latest - args: continue --merge --timeout 2h - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COSIGN_EXPERIMENTAL: true - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8aa83f68..afe83b24 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,70 +1,11 @@ -partial: - by: target project_name: opentelemetry-collector-releases 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: @@ -75,208 +16,19 @@ builds: 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: - - 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 - - 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 - - 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 - - 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 - - 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 - - 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 - - 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 - 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 + - ghcr.io/axoflow/axoflow-otel-collector/opentelemetry-collector-contrib:{{ .Version }}-amd64 + - ghcr.io/axoflow/axoflow-otel-collector/opentelemetry-collector-contrib:latest-amd64 extra_files: - configs/otelcol-contrib.yaml build_flag_templates: @@ -288,34 +40,12 @@ dockers: - --label=org.opencontainers.image.version={{.Version}} - --label=org.opencontainers.image.source={{.GitURL}} use: buildx - - 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 - 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 + - ghcr.io/axoflow/axoflow-otel-collector/opentelemetry-collector-contrib:{{ .Version }}-arm64 + - ghcr.io/axoflow/axoflow-otel-collector/opentelemetry-collector-contrib:latest-arm64 extra_files: - configs/otelcol-contrib.yaml build_flag_templates: @@ -327,106 +57,12 @@ dockers: - --label=org.opencontainers.image.version={{.Version}} - --label=org.opencontainers.image.source={{.GitURL}} use: buildx - - 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 - - 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 }} + - name_template: ghcr.io/axoflow/axoflow-otel-collector/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 + - ghcr.io/axoflow/axoflow-otel-collector/opentelemetry-collector-contrib:{{ .Version }}-amd64 + - ghcr.io/axoflow/axoflow-otel-collector/opentelemetry-collector-contrib:{{ .Version }}-arm64 + - name_template: ghcr.io/axoflow/axoflow-otel-collector/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 + - ghcr.io/axoflow/axoflow-otel-collector/opentelemetry-collector-contrib:latest-amd64 + - ghcr.io/axoflow/axoflow-otel-collector/opentelemetry-collector-contrib:latest-arm64 diff --git a/Makefile b/Makefile index 3e29f767..9f4b9899 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ OTELCOL_BUILDER_VERSION ?= 0.94.1 OTELCOL_BUILDER_DIR ?= ${HOME}/bin OTELCOL_BUILDER ?= ${OTELCOL_BUILDER_DIR}/ocb -DISTRIBUTIONS ?= "otelcol,otelcol-contrib" +DISTRIBUTIONS ?= "otelcol-contrib" ci: check build check: ensure-goreleaser-up-to-date @@ -64,7 +64,7 @@ goreleaser: fi \ } -REMOTE?=git@github.com:open-telemetry/opentelemetry-collector-releases.git +REMOTE?=git@github.com:axoflow/opentelemetry-collector-releases.git .PHONY: push-tags push-tags: @[ "${TAG}" ] || ( echo ">> env var TAG is not set"; exit 1 ) diff --git a/README.md b/README.md index ec4dc033..0e2a874e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -# OpenTelemetry Collector distributions - -> :warning: **Important note:** Git tags in this repository may change at any time to fix any issues found during a release. They are only meant to trigger Github releases and should not be relied upon. +# Axoflow Distribution for OpenTelemetry Collector This repository assembles OpenTelemetry Collector distributions, such as the "core" distribution, or "contrib". It may contain non-official distributions, focused on specific use-cases, such as the load-balancer. @@ -8,11 +6,9 @@ Each distribution contains: - Binaries for a multitude of platforms and architectures (at least linux_amd64, linux_arm64, windows_amd64 and darwin_arm64) - Multi-arch container images (at least amd64 and arm64) -- Packages to be used with Linux distributions (apk, RPM, deb), Mac OS (brew) for the above-mentioned architectures More details about each individual distribution can be seen in its own readme files. Current list of distributions: -- [OpenTelemetry Collector (also known as "otelcol")](./distributions/otelcol) -- [OpenTelemetry Collector Contrib (also known as "otelcol-contrib")](./distributions/otelcol-contrib) +- [Axoflow Distribution for OpenTelemetry Collector (also known as "axoflow-otel-collector")](./distributions/otelcol-contrib) diff --git a/cmd/goreleaser/internal/configure.go b/cmd/goreleaser/internal/configure.go index aa6792bb..3af8a7ff 100644 --- a/cmd/goreleaser/internal/configure.go +++ b/cmd/goreleaser/internal/configure.go @@ -31,9 +31,9 @@ import ( const ArmArch = "arm" var ( - ImagePrefixes = []string{"otel", "ghcr.io/open-telemetry/opentelemetry-collector-releases"} - Architectures = []string{"386", "amd64", "arm", "arm64", "ppc64le", "s390x"} - ArmVersions = []string{"7"} + ImagePrefixes = []string{"ghcr.io/axoflow/axoflow-otel-collector"} + Architectures = []string{"amd64", "arm64"} + ArmVersions = []string{} ) func Generate(imagePrefixes []string, dists []string) config.Project { @@ -43,9 +43,9 @@ func Generate(imagePrefixes []string, dists []string) config.Project { NameTemplate: "{{ .ProjectName }}_checksums.txt", }, - Builds: Builds(dists), - Archives: Archives(dists), - NFPMs: Packages(dists), + Builds: Builds(dists), + Archives: Archives(dists), + //NFPMs: Packages(dists), Dockers: DockerImages(imagePrefixes, dists), DockerManifests: DockerManifests(imagePrefixes, dists), } @@ -70,17 +70,9 @@ func Build(dist string) config.Build { Flags: []string{"-trimpath"}, Ldflags: []string{"-s", "-w"}, }, - Goos: []string{"darwin", "linux", "windows"}, + Goos: []string{"linux"}, Goarch: Architectures, Goarm: ArmVersions, - Ignore: []config.IgnoredBuild{ - {Goos: "darwin", Goarch: "386"}, - {Goos: "darwin", Goarch: "arm"}, - {Goos: "darwin", Goarch: "s390x"}, - {Goos: "windows", Goarch: "arm"}, - {Goos: "windows", Goarch: "arm64"}, - {Goos: "windows", Goarch: "s390x"}, - }, } } diff --git a/configs/otelcol.yaml b/configs/otelcol.yaml deleted file mode 100644 index b3beb48e..00000000 --- a/configs/otelcol.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# To limit exposure to denial of service attacks, change the host in endpoints below from 0.0.0.0 to a specific network interface. -# See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks - -extensions: - health_check: - pprof: - endpoint: 0.0.0.0:1777 - zpages: - endpoint: 0.0.0.0:55679 - -receivers: - otlp: - protocols: - grpc: - endpoint: 0.0.0.0:4317 - http: - endpoint: 0.0.0.0:4318 - - opencensus: - endpoint: 0.0.0.0:55678 - - # Collect own metrics - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: ['0.0.0.0:8888'] - - jaeger: - protocols: - grpc: - endpoint: 0.0.0.0:14250 - thrift_binary: - endpoint: 0.0.0.0:6832 - thrift_compact: - endpoint: 0.0.0.0:6831 - thrift_http: - endpoint: 0.0.0.0:14268 - - zipkin: - endpoint: 0.0.0.0:9411 - -processors: - batch: - -exporters: - debug: - verbosity: detailed - -service: - - pipelines: - - traces: - receivers: [otlp, opencensus, jaeger, zipkin] - processors: [batch] - exporters: [debug] - - metrics: - receivers: [otlp, opencensus, prometheus] - processors: [batch] - exporters: [debug] - - logs: - receivers: [otlp] - processors: [batch] - exporters: [debug] - - extensions: [health_check, pprof, zpages] diff --git a/distributions/otelcol/Dockerfile b/distributions/otelcol/Dockerfile deleted file mode 100644 index c3160d83..00000000 --- a/distributions/otelcol/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM alpine:3.16 as certs -RUN apk --update add ca-certificates - -FROM scratch - -ARG USER_UID=10001 -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 -ENTRYPOINT ["/otelcol"] -CMD ["--config", "/etc/otelcol/config.yaml"] -EXPOSE 4317 55678 55679 diff --git a/distributions/otelcol/README.md b/distributions/otelcol/README.md deleted file mode 100644 index b44218de..00000000 --- a/distributions/otelcol/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# OpenTelemetry Collector Distro - -This distribution contains all the components from the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) repository and a small selection of components tied to open source projects from the [OpenTelemetry Collector Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib) repository. - -## Components - -The full list of components is available in the [manifest](manifest.yaml) diff --git a/distributions/otelcol/manifest.yaml b/distributions/otelcol/manifest.yaml deleted file mode 100644 index f090c343..00000000 --- a/distributions/otelcol/manifest.yaml +++ /dev/null @@ -1,46 +0,0 @@ -dist: - module: github.com/open-telemetry/opentelemetry-collector-releases/core - name: otelcol - description: OpenTelemetry Collector - version: 0.94.0 - output_path: ./_build - otelcol_version: 0.94.1 - -receivers: - - gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.94.1 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.94.0 - -exporters: - - gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.94.1 - - gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.94.1 - - gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.94.1 - - gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.94.1 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.94.0 - -extensions: - - gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.94.1 - - gomod: go.opentelemetry.io/collector/extension/ballastextension v0.94.1 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.94.0 - -processors: - - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.94.1 - - gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.94.1 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.94.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.94.0 - -connectors: - - gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.94.1 diff --git a/distributions/otelcol/otelcol.conf b/distributions/otelcol/otelcol.conf deleted file mode 100644 index 567cf8c1..00000000 --- a/distributions/otelcol/otelcol.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Systemd environment file for the otelcol service - -# Command-line options for the otelcol service. -# Run `/usr/bin/otelcol --help` to see all available options. -OTELCOL_OPTIONS="--config=/etc/otelcol/config.yaml" diff --git a/distributions/otelcol/otelcol.service b/distributions/otelcol/otelcol.service deleted file mode 100644 index f3c4e62e..00000000 --- a/distributions/otelcol/otelcol.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=OpenTelemetry Collector -After=network.target - -[Service] -EnvironmentFile=/etc/otelcol/otelcol.conf -ExecStart=/usr/bin/otelcol $OTELCOL_OPTIONS -KillMode=mixed -Restart=on-failure -Type=simple -User=otel -Group=otel - -[Install] -WantedBy=multi-user.target diff --git a/distributions/otelcol/postinstall.sh b/distributions/otelcol/postinstall.sh deleted file mode 100755 index deb601cd..00000000 --- a/distributions/otelcol/postinstall.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -if command -v systemctl >/dev/null 2>&1; then - systemctl enable otelcol.service - if [ -f /etc/otelcol/config.yaml ]; then - systemctl start otelcol.service - fi -fi diff --git a/distributions/otelcol/preinstall.sh b/distributions/otelcol/preinstall.sh deleted file mode 100755 index e90d69fa..00000000 --- a/distributions/otelcol/preinstall.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -getent passwd otel >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin otel diff --git a/distributions/otelcol/preremove.sh b/distributions/otelcol/preremove.sh deleted file mode 100755 index 363e4de7..00000000 --- a/distributions/otelcol/preremove.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -if command -v systemctl >/dev/null 2>&1; then - systemctl stop otelcol.service - systemctl disable otelcol.service -fi