Skip to content

Commit

Permalink
Shellcheck fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Victoremepunto committed Nov 14, 2023
1 parent 9e332ef commit bc3b963
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -exv

CICD_BOOTSTRAP_URL='https://raw.githubusercontent.com/RedHatInsights/cicd-tools/main/src/bootstrap.sh'
# shellcheck source=/dev/null
source <(curl -sSL "$CICD_BOOTSTRAP_URL") image_builder

get_base_image_tag() {
Expand All @@ -24,8 +25,6 @@ base_image_tag_exists() {
local tag="$1"
local repository="cloudservices/clowder-base"

#response=$(curl -Ls -H "Authorization: Bearer $QUAY_API_TOKEN" \
# "https://quay.io/api/v1/repository/${repository}/tag/?specificTag=$tag&onlyActiveTags=true")
response=$(curl -sSL \
"https://quay.io/api/v1/repository/${repository}/tag/?specificTag=${tag}&onlyActiveTags=true")

Expand Down Expand Up @@ -55,13 +54,15 @@ build_main_image() {

export CICD_IMAGE_BUILDER_BUILD_ARGS=("BASE_IMAGE=${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}")
export CICD_IMAGE_BUILDER_IMAGE_NAME="quay.io/cloudservices/clowder"
export CICD_IMAGE_BUILDER_IMAGE_TAG=$(git rev-parse --short=8 HEAD)
CICD_IMAGE_BUILDER_IMAGE_TAG=$(git rev-parse --short=8 HEAD)

# If the "security-compliance" branch is used for the build, it will tag the image as such.
if [[ "$GIT_BRANCH" == "origin/security-compliance" ]]; then
CICD_IMAGE_BUILDER_IMAGE_TAG="sc-$(date +%Y%m%d)-${CICD_IMAGE_BUILDER_IMAGE_TAG}"
fi

export CICD_IMAGE_BUILDER_IMAGE_TAG

cicd::image_builder::build_and_push
}

Expand Down

0 comments on commit bc3b963

Please sign in to comment.