backport of commit 0cb728ed68165888245cf8bc72e4dece5123ef4f (#17918)

This pull request was automerged via backport-assistant
This commit is contained in:
hc-github-team-nomad-core 2023-07-12 09:52:00 -05:00 committed by GitHub
parent 281f6e482e
commit 048ca39403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 38 additions and 0 deletions

View File

@ -330,6 +330,44 @@ jobs:
docker.io/hashicorppreview/${{ env.PKG_NAME }}:${{ env.version }}-dev docker.io/hashicorppreview/${{ env.PKG_NAME }}:${{ env.version }}-dev
docker.io/hashicorppreview/${{ env.PKG_NAME }}:${{ env.version }}-${{env.revision}} docker.io/hashicorppreview/${{ env.PKG_NAME }}:${{ env.version }}-${{env.revision}}
minimum-os:
name: OS Compatibility
# A quick smoke test of our binaries on our minimum target OS (RHEL 7). Why RHEL 7? Because the glibc version is that old (2.17).
needs:
- get-go-version
- get-product-version
- build-linux
runs-on: ubuntu-22.04
strategy:
fail-fast: false
# Note: Ideally we'd test all our target archs, unfortunately availability of containers of these OS's vary.
# For instance there is no ubi7 image for arm64 (there is on ubi8), RHBZ#1728771. And none at all for arm.
# So we have to settle for only being able to validate where we can, which is just amd64.
matrix:
goos: [linux]
goarch: [amd64]
steps:
- uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version: ${{needs.get-go-version.outputs.go-version}}
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
- name: Test binary
env:
artifact_name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
run: |
echo "::group::Unpack and Prep"
docker pull registry.access.redhat.com/ubi7/ubi-minimal:7.9-1057
unzip "$artifact_name"
echo "::group::Diagnostics"
echo "CGO related build information:"
go version -m ./nomad | grep CGO
echo "GLIBC links:"
go tool nm ./nomad | grep -i glibc | cut -d @ -f 2-3 | sort --version-sort | uniq
echo "::group::Smoke test binary"
docker run --rm -v "$PWD:/src" registry.access.redhat.com/ubi7/ubi-minimal:7.9-1057 /src/nomad version
permissions: permissions:
contents: read contents: read
id-token: write id-token: write