mirror of https://github.com/status-im/consul.git
ci: add docker build smoke test (#13200)
This commit is contained in:
parent
64cfe245dd
commit
9a13be3881
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
function main {
|
||||
local image_name="${1:-${IMAGE_NAME:-}}"
|
||||
local test_version
|
||||
|
||||
if [[ -z "${image_name}" ]]; then
|
||||
echo "ERROR: IMAGE_NAME environment var or argument is required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test_version="$(docker run "${image_name}" version | head -n1 | awk '{print $2}')"
|
||||
if [ "${test_version}" != "v${version}" ]; then
|
||||
echo "Test FAILED"
|
||||
echo "Got: ${test_version}, Want: ${version}"
|
||||
exit 1
|
||||
fi
|
||||
echo "Test PASSED"
|
||||
}
|
||||
|
||||
main "$@"
|
|
@ -253,6 +253,7 @@ jobs:
|
|||
dev_tags: |
|
||||
docker.io/hashicorppreview/${{ env.repo }}:${{ env.version }}
|
||||
docker.io/hashicorppreview/${{ env.repo }}:${{ env.version }}-${{ github.sha }}
|
||||
smoke_test: .github/scripts/docker_smoke.sh
|
||||
- name: Run verification in qemu docker for ${{ matrix.arch }} linux zip
|
||||
if: ${{ matrix.arch == 'arm64' }}
|
||||
run: |
|
||||
|
@ -282,6 +283,7 @@ jobs:
|
|||
target: ubi
|
||||
arch: amd64
|
||||
redhat_tag: scan.connect.redhat.com/ospid-612d01d49f14588c41ebf67c/${{env.repo}}:${{env.version}}-ubi
|
||||
smoke_test: .github/scripts/docker_smoke.sh
|
||||
verify:
|
||||
needs:
|
||||
- get-product-version
|
||||
|
|
Loading…
Reference in New Issue