Fixed Tagging issues in build_command.sh. Also added lines to catch command failures in Gitlab's CI.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set -x
|
|
||||||
|
set -x # For verbosity
|
||||||
|
set -o errexit # The following two causes the script to fail even if one command fail.
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
export BUILDER_NAME=`docker buildx create --use`
|
export BUILDER_NAME=`docker buildx create --use`
|
||||||
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
@@ -10,8 +13,8 @@ then
|
|||||||
docker buildx build . \
|
docker buildx build . \
|
||||||
-f Dockerfile \
|
-f Dockerfile \
|
||||||
--build-arg UBUNTU_VER=$UBUNTU_VER \
|
--build-arg UBUNTU_VER=$UBUNTU_VER \
|
||||||
-t $CI_REGISTRY/docker/$CI_PROJECT_NAME:ubuntu-$UBUNTU_VER:`date "+%Y-%m-%d"` \
|
-t $CI_REGISTRY/docker/$CI_PROJECT_NAME/ubuntu-$UBUNTU_VER:`date "+%Y-%m-%d"` \
|
||||||
-t $CI_REGISTRY/docker/$CI_PROJECT_NAME:ubuntu-$UBUNTU_VER:latest \
|
-t $CI_REGISTRY/docker/$CI_PROJECT_NAME/ubuntu-$UBUNTU_VER:latest \
|
||||||
-t $CI_REGISTRY/docker/$CI_PROJECT_NAME:$UBUNTU_VER \
|
-t $CI_REGISTRY/docker/$CI_PROJECT_NAME:$UBUNTU_VER \
|
||||||
--platform $PLATFORMS \
|
--platform $PLATFORMS \
|
||||||
--push --provenance false
|
--push --provenance false
|
||||||
|
|||||||
Reference in New Issue
Block a user