tools: add delpoy script for clouddot
This will be invoked by the cloud.redhat.com infrastructure to deploy composer containers to quay.io.
This commit is contained in:
parent
c3185466ae
commit
73deee0f43
1 changed files with 18 additions and 0 deletions
18
tools/clouddot_build_deploy.sh
Executable file
18
tools/clouddot_build_deploy.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
# AppSRE runs this script to build the container and push it to Quay.
|
||||
set -exv
|
||||
|
||||
IMAGE_NAME="quay.io/cloudservices/osbuild-composer"
|
||||
IMAGE_TAG=$(git rev-parse --short=7 HEAD)
|
||||
|
||||
if [[ -z "$QUAY_USER" || -z "$QUAY_TOKEN" ]]; then
|
||||
echo "QUAY_USER and QUAY_TOKEN must be set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DOCKER_CONF="$PWD/.docker"
|
||||
mkdir -p "$DOCKER_CONF"
|
||||
docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io
|
||||
docker --config="$DOCKER_CONF" build -f distribution/Dockerfile-ubi -t "${IMAGE_NAME}:${IMAGE_TAG}" .
|
||||
docker --config="$DOCKER_CONF" push "${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue