From 81336adba56c14c814e3b477f2fcb200096093b7 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 12:00:48 +0100 Subject: [PATCH 01/20] fix(CI): remove unsupported platforms Signed-off-by: Szilard Parrag --- .github/workflows/ci-goreleaser.yaml | 14 +- .github/workflows/release.yaml | 16 +- .goreleaser.yaml | 215 +-------------------------- 3 files changed, 6 insertions(+), 239 deletions(-) diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml index e41729a9..1aa9a8f7 100644 --- a/.github/workflows/ci-goreleaser.yaml +++ b/.github/workflows/ci-goreleaser.yaml @@ -20,20 +20,10 @@ jobs: strategy: matrix: GOOS: [linux, windows, darwin] - GOARCH: ["386", amd64, arm64, ppc64le, arm, s390x] + GOARCH: [amd64, arm64,] 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 runs-on: ubuntu-20.04 steps: @@ -45,7 +35,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 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 34e230a9..d5b7348f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,20 +9,10 @@ jobs: strategy: matrix: GOOS: [linux, windows, darwin] - GOARCH: ["386", amd64, arm64, ppc64le, arm, s390x] + GOARCH: [amd64, arm64] 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 runs-on: ubuntu-20.04 steps: @@ -34,7 +24,7 @@ jobs: - uses: docker/setup-qemu-action@v3 with: - platforms: arm64,ppc64le,linux/arm/v7,s390x + platforms: arm64 - uses: docker/setup-buildx-action@v3 @@ -102,7 +92,7 @@ jobs: - uses: docker/setup-qemu-action@v3 with: - platforms: arm64,ppc64le,s390x + platforms: arm64 - uses: docker/setup-buildx-action@v3 diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8aa83f68..3dddde8a 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -8,27 +8,13 @@ builds: - 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: @@ -44,27 +30,14 @@ builds: - 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: @@ -135,25 +108,6 @@ nfpms: 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 @@ -173,26 +127,6 @@ dockers: - --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 @@ -212,63 +146,6 @@ dockers: - --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 @@ -288,26 +165,6 @@ 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 @@ -327,106 +184,36 @@ 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 }} 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 From ed777b21516a760ade9afc67d38110bb621819a1 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 12:11:55 +0100 Subject: [PATCH 02/20] GH: switch from goreleaser-pro to goreleaser Signed-off-by: Szilard Parrag --- .github/workflows/ci-goreleaser.yaml | 3 +-- .github/workflows/release.yaml | 6 ++---- .goreleaser.yaml | 4 ---- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml index 1aa9a8f7..059899a9 100644 --- a/.github/workflows/ci-goreleaser.yaml +++ b/.github/workflows/ci-goreleaser.yaml @@ -52,10 +52,9 @@ jobs: - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: - distribution: goreleaser-pro + distribution: goreleaser version: latest args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h --split 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 d5b7348f..c11823a8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -56,7 +56,7 @@ jobs: - uses: goreleaser/goreleaser-action@v5 if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit with: - distribution: goreleaser-pro + distribution: goreleaser version: latest args: release --clean --split --timeout 2h env: @@ -64,7 +64,6 @@ jobs: GOARCH: ${{ matrix.GOARCH }} GITHUB_TOKEN: ${{ secrets.GH_PAT }} COSIGN_EXPERIMENTAL: true - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - uses: actions/upload-artifact@v3 with: @@ -119,10 +118,9 @@ jobs: - uses: goreleaser/goreleaser-action@v5 if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit with: - distribution: goreleaser-pro + distribution: goreleaser 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 3dddde8a..e9cdccd6 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -10,8 +10,6 @@ builds: goarch: - amd64 - arm64 - goarm: - - "7" ignore: - goos: windows goarch: arm64 @@ -32,8 +30,6 @@ builds: goarch: - amd64 - arm64 - goarm: - - "7" ignore: - goos: windows goarch: arm64 From 729361ce8abe9c9f8e3c1eaa4751d1c97be76cec Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 12:12:45 +0100 Subject: [PATCH 03/20] GH: disable Docker.io Signed-off-by: Szilard Parrag --- .github/workflows/release.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c11823a8..1f8774da 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -36,11 +36,11 @@ 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: 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 @@ -105,8 +105,8 @@ jobs: name: all-artifacts path: dist - - name: Log into Docker.io - run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + # - 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 From 81f73747545a5e1b523abc7d332df7a46a2dfefa Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 12:18:07 +0100 Subject: [PATCH 04/20] GH(secrets): replace GH_PAT with GITHUB_TOKEN Signed-off-by: Szilard Parrag --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1f8774da..446f5ea2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -62,7 +62,7 @@ jobs: env: GOOS: ${{ matrix.GOOS }} GOARCH: ${{ matrix.GOARCH }} - GITHUB_TOKEN: ${{ secrets.GH_PAT }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COSIGN_EXPERIMENTAL: true - uses: actions/upload-artifact@v3 From f866d826d8180d5bc8e92138ac3b857b55eda4d8 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 12:28:50 +0100 Subject: [PATCH 05/20] GH: remove gorelease pro only split flag Signed-off-by: Szilard Parrag --- .github/workflows/ci-goreleaser.yaml | 2 +- .github/workflows/release.yaml | 2 +- .goreleaser.yaml | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml index 059899a9..dd141a24 100644 --- a/.github/workflows/ci-goreleaser.yaml +++ b/.github/workflows/ci-goreleaser.yaml @@ -54,7 +54,7 @@ jobs: with: distribution: goreleaser version: latest - args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h --split + args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h env: GOOS: ${{ matrix.GOOS }} GOARCH: ${{ matrix.GOARCH }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 446f5ea2..4d6f9588 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -58,7 +58,7 @@ jobs: with: distribution: goreleaser version: latest - args: release --clean --split --timeout 2h + args: release --clean --timeout 2h env: GOOS: ${{ matrix.GOOS }} GOARCH: ${{ matrix.GOARCH }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e9cdccd6..3d7ff9db 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,5 +1,3 @@ -partial: - by: target project_name: opentelemetry-collector-releases builds: - id: otelcol From 82548bc8b7f6ffeb59458712bba16bb4d4a1a6cd Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 13:31:50 +0100 Subject: [PATCH 06/20] Make: remove otelcol (core), only build contrib Signed-off-by: Szilard Parrag --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3e29f767..7014f427 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 From a2f413026f8ecf75fc1051d174825bddb3ed94e1 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 13:59:12 +0100 Subject: [PATCH 07/20] goreleaser: remove collector (core) Signed-off-by: Szilard Parrag --- .goreleaser.yaml | 106 ----------------------------------------------- 1 file changed, 106 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 3d7ff9db..31720a05 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,25 +1,5 @@ project_name: opentelemetry-collector-releases builds: - - id: otelcol - goos: - - darwin - - linux - - windows - goarch: - - amd64 - - arm64 - ignore: - - goos: windows - goarch: arm64 - dir: distributions/otelcol/_build - binary: otelcol - ldflags: - - -s - - -w - flags: - - -trimpath - env: - - CGO_ENABLED=0 - id: otelcol-contrib goos: - darwin @@ -42,39 +22,11 @@ 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 @@ -102,44 +54,6 @@ nfpms: checksum: name_template: '{{ .ProjectName }}_checksums.txt' dockers: - - 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: 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: amd64 dockerfile: distributions/otelcol-contrib/Dockerfile @@ -179,26 +93,6 @@ dockers: - --label=org.opencontainers.image.source={{.GitURL}} use: buildx docker_manifests: - - name_template: otel/opentelemetry-collector:{{ .Version }} - image_templates: - - otel/opentelemetry-collector:{{ .Version }}-amd64 - - otel/opentelemetry-collector:{{ .Version }}-arm64 - - name_template: otel/opentelemetry-collector:latest - image_templates: - - otel/opentelemetry-collector:latest-amd64 - - otel/opentelemetry-collector:latest-arm64 - - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }} - image_templates: - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:{{ .Version }}-arm64 - - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest - image_templates: - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:latest-arm64 - - name_template: otel/opentelemetry-collector-contrib:{{ .Version }} - image_templates: - - otel/opentelemetry-collector-contrib:{{ .Version }}-amd64 - - otel/opentelemetry-collector-contrib:{{ .Version }}-arm64 - name_template: otel/opentelemetry-collector-contrib:latest image_templates: - otel/opentelemetry-collector-contrib:latest-amd64 From 45401e4996ae8aab1d6691ddd57501c1d44d44e4 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 14:23:06 +0100 Subject: [PATCH 08/20] GH: remove Windows platform to save space Signed-off-by: Szilard Parrag --- .github/workflows/ci-goreleaser.yaml | 5 +---- .github/workflows/release.yaml | 5 +---- .goreleaser.yaml | 4 ---- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml index dd141a24..bce942de 100644 --- a/.github/workflows/ci-goreleaser.yaml +++ b/.github/workflows/ci-goreleaser.yaml @@ -19,11 +19,8 @@ jobs: name: Check GoReleaser Configuration strategy: matrix: - GOOS: [linux, windows, darwin] + GOOS: [linux, darwin] GOARCH: [amd64, arm64,] - exclude: - - GOOS: windows - GOARCH: arm64 runs-on: ubuntu-20.04 steps: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4d6f9588..0e9d2619 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,11 +8,8 @@ jobs: prepare: strategy: matrix: - GOOS: [linux, windows, darwin] + GOOS: [linux, darwin] GOARCH: [amd64, arm64] - exclude: - - GOOS: windows - GOARCH: arm64 runs-on: ubuntu-20.04 steps: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 31720a05..b395a04a 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -4,13 +4,9 @@ builds: goos: - darwin - linux - - windows goarch: - amd64 - arm64 - ignore: - - goos: windows - goarch: arm64 dir: distributions/otelcol-contrib/_build binary: otelcol-contrib From f54e80238b2cb78e36ad10bdb00d037a5e3de81d Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 14:35:06 +0100 Subject: [PATCH 09/20] GH: remove Darwin platform to save space Signed-off-by: Szilard Parrag --- .github/workflows/ci-goreleaser.yaml | 2 +- .github/workflows/release.yaml | 2 +- .goreleaser.yaml | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml index bce942de..b904dbc1 100644 --- a/.github/workflows/ci-goreleaser.yaml +++ b/.github/workflows/ci-goreleaser.yaml @@ -19,7 +19,7 @@ jobs: name: Check GoReleaser Configuration strategy: matrix: - GOOS: [linux, darwin] + GOOS: [linux] GOARCH: [amd64, arm64,] runs-on: ubuntu-20.04 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0e9d2619..63a45a8a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,7 @@ jobs: prepare: strategy: matrix: - GOOS: [linux, darwin] + GOOS: [linux] GOARCH: [amd64, arm64] runs-on: ubuntu-20.04 diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b395a04a..a0e107ac 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -2,7 +2,6 @@ project_name: opentelemetry-collector-releases builds: - id: otelcol-contrib goos: - - darwin - linux goarch: - amd64 From 16fc0a36b03e7af7f304d789293553e2f6bdeeba Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 15:11:44 +0100 Subject: [PATCH 10/20] goreleaser: remove native packages Signed-off-by: Szilard Parrag --- .goreleaser.yaml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index a0e107ac..a1fa9c48 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -21,31 +21,6 @@ archives: 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: 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: From f11d12adaa2eb8899363e20e4f942ffe20481777 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 15:12:38 +0100 Subject: [PATCH 11/20] goreleaser: use correct docker image tags Signed-off-by: Szilard Parrag --- .goreleaser.yaml | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index a1fa9c48..f138dfbd 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -28,10 +28,8 @@ dockers: 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/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 + - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 extra_files: - configs/otelcol-contrib.yaml build_flag_templates: @@ -47,10 +45,8 @@ dockers: 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/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 + - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 extra_files: - configs/otelcol-contrib.yaml build_flag_templates: @@ -63,15 +59,11 @@ dockers: - --label=org.opencontainers.image.source={{.GitURL}} use: buildx docker_manifests: - - name_template: otel/opentelemetry-collector-contrib:latest + - name_template: ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }} image_templates: - - otel/opentelemetry-collector-contrib:latest-amd64 - - otel/opentelemetry-collector-contrib:latest-arm64 - - name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }} + - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 + - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 + - name_template: ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest image_templates: - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 - - 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-amd64 - - ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 + - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 + - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 From f52b983cebfee530741fa2365e95067e58044a3d Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 15:48:19 +0100 Subject: [PATCH 12/20] GH: fix upload by removing architectures from matrix error msg: error=scm releases: failed to publish artifacts: failed to upload otelcol-contrib_0.94.0_linux_amd64.tar.gz after 1 tries: POST https://uploads.github.com/repos/OverOrion/opentelemetry-collector-releases/releases/140558496/assets?name=otelcol-contrib_0.94.0_linux_amd64.tar.gz: 422 Validation Failed [{Resource:ReleaseAsset Field:name Code:already_exists Message:}] Signed-off-by: Szilard Parrag --- .github/workflows/ci-goreleaser.yaml | 2 -- .github/workflows/release.yaml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml index b904dbc1..221b184a 100644 --- a/.github/workflows/ci-goreleaser.yaml +++ b/.github/workflows/ci-goreleaser.yaml @@ -20,7 +20,6 @@ jobs: strategy: matrix: GOOS: [linux] - GOARCH: [amd64, arm64,] runs-on: ubuntu-20.04 steps: @@ -54,4 +53,3 @@ jobs: args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h env: GOOS: ${{ matrix.GOOS }} - GOARCH: ${{ matrix.GOARCH }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 63a45a8a..64fb498f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,7 +9,6 @@ jobs: strategy: matrix: GOOS: [linux] - GOARCH: [amd64, arm64] runs-on: ubuntu-20.04 steps: @@ -58,7 +57,6 @@ jobs: args: release --clean --timeout 2h env: GOOS: ${{ matrix.GOOS }} - GOARCH: ${{ matrix.GOARCH }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COSIGN_EXPERIMENTAL: true From 38268c4e44bc92f18a990fd049e400934b8efd82 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 15:49:10 +0100 Subject: [PATCH 13/20] GH: update upload-artifact to v4 Signed-off-by: Szilard Parrag --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 64fb498f..4d1286e1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -60,7 +60,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COSIGN_EXPERIMENTAL: true - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: all-artifacts path: dist/*/* From d2a673cb0807d922722abb368920e1898af703ee Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 16:20:45 +0100 Subject: [PATCH 14/20] GH: refine release Signed-off-by: Szilard Parrag --- .github/workflows/release.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4d1286e1..29d600bf 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,7 +5,12 @@ on: tags: ["v*"] jobs: - prepare: + Release: + permissions: + id-token: write + packages: write + contents: write + strategy: matrix: GOOS: [linux] @@ -32,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: From 214c5c9e62cfbc9bd5c49624ad3c720c6c50c4ff Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Thu, 8 Feb 2024 16:21:10 +0100 Subject: [PATCH 15/20] GH: remove outdated release job Signed-off-by: Szilard Parrag --- .github/workflows/release.yaml | 55 ---------------------------------- 1 file changed, 55 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 29d600bf..c947d178 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -63,58 +63,3 @@ jobs: 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 - - - 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 - version: latest - args: continue --merge --timeout 2h - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COSIGN_EXPERIMENTAL: true From 0e0db2295b3fc86b229cf7b1722556fa7583bb5f Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Tue, 13 Feb 2024 09:51:09 +0100 Subject: [PATCH 16/20] GH: remove cache-hit check Signed-off-by: Szilard Parrag --- .github/workflows/release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c947d178..11028677 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -49,7 +49,6 @@ 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 version: latest From bdd211b120291a4deb8b744b1264aef207262ac3 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Tue, 13 Feb 2024 09:54:56 +0100 Subject: [PATCH 17/20] GH: use fixed version for goreleaser Signed-off-by: Szilard Parrag --- .github/workflows/ci-goreleaser.yaml | 2 +- .github/workflows/release.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml index 221b184a..e31c4b99 100644 --- a/.github/workflows/ci-goreleaser.yaml +++ b/.github/workflows/ci-goreleaser.yaml @@ -49,7 +49,7 @@ jobs: uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser - version: latest + version: v1.24.0 args: --snapshot --clean --skip-sign --skip-sbom --timeout 2h env: GOOS: ${{ matrix.GOOS }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 11028677..bae3a1d9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -51,7 +51,7 @@ jobs: - uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser - version: latest + version: v1.24.0 args: release --clean --timeout 2h env: GOOS: ${{ matrix.GOOS }} From dbb848b3da07d0575c09f94e9daca6a1a8210e23 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Tue, 13 Feb 2024 14:22:11 +0100 Subject: [PATCH 18/20] chore(rename): move to axoflow organization Signed-off-by: Szilard Parrag --- .goreleaser.yaml | 20 ++++++++++---------- Makefile | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f138dfbd..052974c4 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -28,8 +28,8 @@ dockers: goarch: amd64 dockerfile: distributions/otelcol-contrib/Dockerfile image_templates: - - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 - - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 + - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 + - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 extra_files: - configs/otelcol-contrib.yaml build_flag_templates: @@ -45,8 +45,8 @@ dockers: goarch: arm64 dockerfile: distributions/otelcol-contrib/Dockerfile image_templates: - - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 - - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 + - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 + - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 extra_files: - configs/otelcol-contrib.yaml build_flag_templates: @@ -59,11 +59,11 @@ dockers: - --label=org.opencontainers.image.source={{.GitURL}} use: buildx docker_manifests: - - name_template: ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }} + - name_template: ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }} image_templates: - - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 - - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 - - name_template: ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest + - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 + - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 + - name_template: ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest image_templates: - - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 - - ghcr.io/overorion/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 + - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 + - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 diff --git a/Makefile b/Makefile index 7014f427..9f4b9899 100644 --- a/Makefile +++ b/Makefile @@ -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 ) From 7b550f7832ad426937b006c67bccbf5789ff50a0 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Tue, 13 Feb 2024 14:26:56 +0100 Subject: [PATCH 19/20] fix(goreleaser): generate-goreleaser target works Signed-off-by: Szilard Parrag --- .goreleaser.yaml | 1 - cmd/goreleaser/internal/configure.go | 22 +++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 052974c4..0cae7ec0 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -6,7 +6,6 @@ builds: goarch: - amd64 - arm64 - dir: distributions/otelcol-contrib/_build binary: otelcol-contrib ldflags: diff --git a/cmd/goreleaser/internal/configure.go b/cmd/goreleaser/internal/configure.go index aa6792bb..73ab64e7 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/opentelemetry-collector-releases"} + 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"}, - }, } } From cb83bb24ff08e8e75efe57b9aa5e14ff8714d7de Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Tue, 13 Feb 2024 14:35:54 +0100 Subject: [PATCH 20/20] chore(renaming): axoflow-otel-collector Signed-off-by: Szilard Parrag --- .goreleaser.yaml | 20 ++++---- README.md | 8 +-- cmd/goreleaser/internal/configure.go | 2 +- configs/otelcol.yaml | 71 --------------------------- distributions/otelcol/Dockerfile | 14 ------ distributions/otelcol/README.md | 7 --- distributions/otelcol/manifest.yaml | 46 ----------------- distributions/otelcol/otelcol.conf | 5 -- distributions/otelcol/otelcol.service | 15 ------ distributions/otelcol/postinstall.sh | 22 --------- distributions/otelcol/preinstall.sh | 17 ------- distributions/otelcol/preremove.sh | 20 -------- 12 files changed, 13 insertions(+), 234 deletions(-) delete mode 100644 configs/otelcol.yaml delete mode 100644 distributions/otelcol/Dockerfile delete mode 100644 distributions/otelcol/README.md delete mode 100644 distributions/otelcol/manifest.yaml delete mode 100644 distributions/otelcol/otelcol.conf delete mode 100644 distributions/otelcol/otelcol.service delete mode 100755 distributions/otelcol/postinstall.sh delete mode 100755 distributions/otelcol/preinstall.sh delete mode 100755 distributions/otelcol/preremove.sh diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0cae7ec0..afe83b24 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -27,8 +27,8 @@ dockers: goarch: amd64 dockerfile: distributions/otelcol-contrib/Dockerfile image_templates: - - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 - - ghcr.io/axoflow/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: @@ -44,8 +44,8 @@ dockers: goarch: arm64 dockerfile: distributions/otelcol-contrib/Dockerfile image_templates: - - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 - - ghcr.io/axoflow/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: @@ -58,11 +58,11 @@ dockers: - --label=org.opencontainers.image.source={{.GitURL}} use: buildx docker_manifests: - - name_template: ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }} + - name_template: ghcr.io/axoflow/axoflow-otel-collector/opentelemetry-collector-contrib:{{ .Version }} image_templates: - - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-amd64 - - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{ .Version }}-arm64 - - name_template: ghcr.io/axoflow/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/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-amd64 - - ghcr.io/axoflow/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest-arm64 + - 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/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 73ab64e7..3af8a7ff 100644 --- a/cmd/goreleaser/internal/configure.go +++ b/cmd/goreleaser/internal/configure.go @@ -31,7 +31,7 @@ import ( const ArmArch = "arm" var ( - ImagePrefixes = []string{"ghcr.io/axoflow/opentelemetry-collector-releases"} + ImagePrefixes = []string{"ghcr.io/axoflow/axoflow-otel-collector"} Architectures = []string{"amd64", "arm64"} ArmVersions = []string{} ) 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