mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-08 13:06:29 +00:00
Simplifies and fix docker images tests on release (#3982)
This commit is contained in:
parent
d0d960745d
commit
b4c5bb7de4
20
.github/workflows/docker_release.yml
vendored
20
.github/workflows/docker_release.yml
vendored
@ -50,14 +50,16 @@ jobs:
|
||||
- name: Test base images
|
||||
run: |
|
||||
EXPECTED_VERSION=$(cat VERSION.txt)
|
||||
VERSION=$(docker run --rm deepset/haystack:base-cpu-${{ steps.meta.outputs.version }} --platform linux/amd64 python -c"import haystack; print(haystack.__version__)")
|
||||
[[ "$VERSION" = "$EXPECTED_VERSION" ]]
|
||||
VERSION=$(docker run --rm deepset/haystack:base-gpu-${{ steps.meta.outputs.version }} --platform linux/amd64 python -c"import haystack; print(haystack.__version__)")
|
||||
[[ "$VERSION" = "$EXPECTED_VERSION" ]]
|
||||
VERSION=$(docker run --rm deepset/haystack:base-cpu-${{ steps.meta.outputs.version }} --platform linux/arm64 python -c"import haystack; print(haystack.__version__)")
|
||||
[[ "$VERSION" = "$EXPECTED_VERSION" ]]
|
||||
VERSION=$(docker run --rm deepset/haystack:base-gpu-${{ steps.meta.outputs.version }} --platform linux/arm64 python -c"import haystack; print(haystack.__version__)")
|
||||
[[ "$VERSION" = "$EXPECTED_VERSION" ]]
|
||||
function test_image {
|
||||
local TAG=$1
|
||||
local PLATFORM=$2
|
||||
local VERSION=$(docker run --platform $PLATFORM --rm deepset/haystack:$TAG python -c"import haystack; print(haystack.__version__)")
|
||||
[[ "$VERSION" = "$EXPECTED_VERSION" ]] || echo "::error 'Haystack version in deepset/haystack:$TAG image for $PLATFORM is different from expected'"
|
||||
}
|
||||
test_image base-cpu-${{ steps.meta.outputs.version }} linux/amd64
|
||||
test_image base-gpu-${{ steps.meta.outputs.version }} linux/amd64
|
||||
test_image base-cpu-${{ steps.meta.outputs.version }} linux/arm64
|
||||
test_image base-gpu-${{ steps.meta.outputs.version }} linux/arm64
|
||||
|
||||
- name: Build api images
|
||||
uses: docker/bake-action@v2
|
||||
@ -110,4 +112,4 @@ jobs:
|
||||
sleep 15s
|
||||
EXPECTED_VERSION=$(cat VERSION.txt)
|
||||
VERSION=$(curl http://localhost:8000/hs_version | jq .hs_version)
|
||||
[[ "$VERSION" = "$EXPECTED_VERSION" ]]
|
||||
[[ "$VERSION" = "$EXPECTED_VERSION" ]] || echo "::error 'Haystack version in REST API image is different from expected'"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user