Skip to content

Commit

Permalink
[chore] remove linux package builds and tests (open-telemetry#34372)
Browse files Browse the repository at this point in the history
This PR removes the package tests from this repo since they were moved
to the -releases repo in
open-telemetry/opentelemetry-collector-releases#604.

Related issues:
- Original issue:
open-telemetry/opentelemetry-collector-releases#439
- Also fixes
open-telemetry#34748

Advantages of doing this:
- removal of duplicated code that has potential to diverge with linux
package building and testing happening here with custom code, but the
actual code that is used to build the released linux packages is in the
-releases repo. This should result in lower maintenance effort and
removes technical debt.

Disadvantages discussed here:
- bit of a shift-right for the linux package tests since they are now
tested in the -releases repo which could lead to situations where bugs
are found too late and e.g. the contrib repo already got a new tag which
has a bug that only comes up in the releases repo

---------

Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
  • Loading branch information
mowies authored and jriguera committed Oct 4, 2024
1 parent b97d683 commit 0ae23be
Show file tree
Hide file tree
Showing 16 changed files with 3 additions and 426 deletions.
66 changes: 3 additions & 63 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -528,57 +528,9 @@ jobs:
name: collector-binaries-${{ matrix.os }}-${{ matrix.arch }}
path: ./bin/*

build-package:
runs-on: ubuntu-latest
needs: [cross-compile]
strategy:
fail-fast: false
matrix:
package_type: ["deb", "rpm"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Install fpm
run: gem install --no-document fpm -v 1.15.1
- name: Download Collector Binaries
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: bin/
pattern: collector-binaries-*
- run: chmod +x bin/*
- name: Set Release Tag
id: github_tag
run: ./.github/workflows/scripts/set_release_tag.sh
- name: Build ${{ matrix.package_type }} amd64 package
run: ./internal/buildscripts/packaging/fpm/${{ matrix.package_type }}/build.sh "${{ steps.github_tag.outputs.tag }}" "amd64" "./dist/"
- name: Build ${{ matrix.package_type }} arm64 package
run: ./internal/buildscripts/packaging/fpm/${{ matrix.package_type }}/build.sh "${{ steps.github_tag.outputs.tag }}" "arm64" "./dist/"
- name: Build ${{ matrix.package_type }} ppc64le package
run: ./internal/buildscripts/packaging/fpm/${{ matrix.package_type }}/build.sh "${{ steps.github_tag.outputs.tag }}" "ppc64le" "./dist/"
- name: Build ${{ matrix.package_type }} s390x package
run: ./internal/buildscripts/packaging/fpm/${{ matrix.package_type }}/build.sh "${{ steps.github_tag.outputs.tag }}" "s390x" "./dist/"
- name: Test ${{ matrix.package_type }} package
run: |
if [[ "${{ matrix.package_type }}" = "deb" ]]; then
./internal/buildscripts/packaging/fpm/test.sh dist/otel-contrib-collector*amd64.deb examples/demo/otel-collector-config.yaml
else
./internal/buildscripts/packaging/fpm/test.sh dist/otel-contrib-collector*x86_64.rpm examples/demo/otel-collector-config.yaml
fi
- name: Upload Packages
uses: actions/upload-artifact@v4
with:
name: collector-packages-${{ matrix.package_type }}
path: ./dist/*

publish-check:
runs-on: ubuntu-latest
needs: [lint, unittest, integration-tests, build-package]
needs: [lint, unittest, integration-tests]
steps:
- uses: actions/checkout@v4
- name: Download Binaries
Expand All @@ -587,18 +539,12 @@ jobs:
merge-multiple: true
path: ./bin/
pattern: collector-binaries-*
- name: Download Packages
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: ./dist/
pattern: collector-packages-*
- name: Verify Distribution Files Exist
id: check
run: ./.github/workflows/scripts/verify-dist-files-exist.sh
publish-dev:
runs-on: ubuntu-latest
needs: [lint, unittest, integration-tests, build-package]
needs: [lint, unittest, integration-tests]
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.repository == 'open-telemetry/opentelemetry-collector-contrib'
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -631,12 +577,6 @@ jobs:
path: ./bin/
pattern: collector-binaries-*
- run: chmod +x bin/*
- name: Download Packages
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: ./dist/
pattern: collector-packages-*
- name: Add Permissions to Tool Binaries
run: chmod -R +x ./dist
- name: Verify Distribution Files Exist
Expand Down Expand Up @@ -665,7 +605,7 @@ jobs:
docker push otel/opentelemetry-collector-contrib-dev:latest
publish-stable:
runs-on: ubuntu-latest
needs: [lint, unittest, integration-tests, build-package]
needs: [lint, unittest, integration-tests]
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'open-telemetry/opentelemetry-collector-contrib'
steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/scripts/verify-dist-files-exist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ files=(
bin/otelcontribcol_linux_amd64
bin/otelcontribcol_linux_s390x
bin/otelcontribcol_windows_amd64.exe
dist/otel-contrib-collector-*.aarch64.rpm
dist/otel-contrib-collector_*_amd64.deb
dist/otel-contrib-collector-*.x86_64.rpm
dist/otel-contrib-collector_*_arm64.deb
dist/otel-contrib-collector-*.ppc64le.rpm
dist/otel-contrib-collector_*_ppc64le.deb
dist/otel-contrib-collector_*_s390x.deb
dist/otel-contrib-collector-*.s390x.rpm
# skip. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/10113
# dist/otel-contrib-collector-*amd64.msi

Expand Down
16 changes: 0 additions & 16 deletions internal/buildscripts/packaging/fpm/Dockerfile

This file was deleted.

66 changes: 0 additions & 66 deletions internal/buildscripts/packaging/fpm/common.sh

This file was deleted.

14 changes: 0 additions & 14 deletions internal/buildscripts/packaging/fpm/deb/Dockerfile.test

This file was deleted.

14 changes: 0 additions & 14 deletions internal/buildscripts/packaging/fpm/deb/README.md

This file was deleted.

40 changes: 0 additions & 40 deletions internal/buildscripts/packaging/fpm/deb/build.sh

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions internal/buildscripts/packaging/fpm/otel-contrib-collector.service

This file was deleted.

11 changes: 0 additions & 11 deletions internal/buildscripts/packaging/fpm/postinstall.sh

This file was deleted.

6 changes: 0 additions & 6 deletions internal/buildscripts/packaging/fpm/preinstall.sh

This file was deleted.

9 changes: 0 additions & 9 deletions internal/buildscripts/packaging/fpm/preuninstall.sh

This file was deleted.

9 changes: 0 additions & 9 deletions internal/buildscripts/packaging/fpm/rpm/Dockerfile.test

This file was deleted.

14 changes: 0 additions & 14 deletions internal/buildscripts/packaging/fpm/rpm/README.md

This file was deleted.

Loading

0 comments on commit 0ae23be

Please sign in to comment.