|
…
|
||
|---|---|---|
| .. | ||
| Dockerfile.test.deb | ||
| Dockerfile.test.rpm | ||
| README.md | ||
| common.sh | ||
| package-tests.sh | ||
README.md
Build and test deb/rpm packages
Prerequisites
Tools:
- Go
- GoReleaser
- Podman
- make
How to build and test
To build the Collector Linux packages, a few steps are required:
- Run
make generateto (re-)generate sources and GoReleaser files - Go to the distribution folder that you want to build (under the
distributionsfolder) - Run
goreleaser release --snapshot --clean --skip sbom,sign,archive,docker- This will build the necessary release assets with all architectures and packaging types into the
distfolder inside your current folder. (We can skip many parts of the release build that we don't need for running the package tests locally) - We use GoReleaser Pro only features in CI. If you want to run this locally, and you run into
unmarshalerrors, you may have to remove the parts that goreleaser complains about or use a pro license.
- This will build the necessary release assets with all architectures and packaging types into the
- Go back to the root of the repo
- To start the package tests,
run:
./scripts/package-tests/package-tests.sh ./distributions/<otelcol|otelcol-contrib>/dist/<otelcol|otelcol-contrib>_*-SNAPSHOT-*_linux_amd64.<deb|rpm> <otelcol|otelcol-contrib>