25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/usr/bin/env bash
-
- function check_env_variables_are_setted {
- if [ -z "${QUAY_USERNAME}" ] || [ -z "${QUAY_PASSWORD}" ]; then
- echo "Need to set QUAY_USERNAME and QUAY_PASSWORD env variables to release containers"
- exit 1
- fi
- }
-
- set +o errexit
-
- check_env_variables_are_setted
-
- set -o errexit
- set -o pipefail
- set -o nounset
-
- function build_and_push_container {
- container=$1
- docker build --tag lesspass/${container} ./${container}
- docker tag lesspass/${container} quay.io/lesspass/${container}
- docker push quay.io/lesspass/${container}
- }
-
- function build_and_push_containers {
- docker login --username="${QUAY_USERNAME}" --password="${QUAY_PASSWORD}" quay.io
- build_and_push_container webserver
- build_and_push_container backend
- build_and_push_container frontend
- }
-
- build_and_push_containers
|