Add expected build arch (#489)
* Add fail status if build unexpected platforms * Build: set exit code for action * Build: Change expected platforms message
This commit is contained in:
parent
e44acbebf7
commit
713a06e999
14
.github/workflows/4testing-build.yml
vendored
14
.github/workflows/4testing-build.yml
vendored
@ -47,6 +47,7 @@ jobs:
|
||||
DOCKER_TAG=$( echo ${{ env.RELEASE_VERSION }} | sed 's/^.//' )
|
||||
PACKAGE_VERSION=$( echo $DOCKER_TAG | sed -E 's/(.*)\./\1-/' )
|
||||
NODE_PLATFORMS=$( echo ${{ steps.buildx.outputs.platforms }} | sed 's/linux\///g' | sed 's/,/ /g' )
|
||||
EXPECTED_PLATFORMS="linux/amd64,linux/arm64"
|
||||
echo "Start check avalivable build platforms >>"
|
||||
|
||||
### ==>> In this loop we will check all avalivable documentserver architectures. After that all accessed arch will be added to build-platforms list. ###
|
||||
@ -76,6 +77,15 @@ jobs:
|
||||
echo "DONE: Check passed >> Build for platforms: ${BUILD_PLATFORMS}"
|
||||
echo "Build is starting ... >>"
|
||||
|
||||
### == >> Set exit code for action
|
||||
if [ ${BUILD_PLATFORMS} == ${EXPECTED_PLATFORMS} ]; then
|
||||
EXIT_CODE=0
|
||||
echo "OK: Build platforms is expected"
|
||||
else
|
||||
EXIT_CODE=1
|
||||
echo "WARNING: Build platforms is unexpected action is gonna be marked as Failed"
|
||||
fi
|
||||
|
||||
### ==>> Build and push images at this step ###
|
||||
PRODUCT_EDITION=${{ matrix.edition }} \
|
||||
PACKAGE_URL=$PACKAGE_URL_BUILD \
|
||||
@ -89,6 +99,6 @@ jobs:
|
||||
docker buildx bake \
|
||||
-f docker-bake.hcl ${{ matrix.images }} \
|
||||
--push
|
||||
echo "DONE: Build success >> exit with 0"
|
||||
exit 0
|
||||
echo "DONE: Build success >> exit with ${EXIT_CODE}"
|
||||
exit ${EXIT_CODE}
|
||||
shell: bash
|
||||
|
Loading…
x
Reference in New Issue
Block a user