Skip to content

Commit

Permalink
Merge pull request #397 from carlosmmatos/fix-gov-shra
Browse files Browse the repository at this point in the history
fix(container-pull): fixes issue with incorrect gov url for shra
  • Loading branch information
redhatrises authored Jan 14, 2025
2 parents 30a2b64 + 8d27906 commit a49f2c7
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ curl_command() {

fetch_tags() {
bearer_result=$(echo "-u $ART_USERNAME:$ART_PASSWORD" |
curl -s -L "https://$cs_registry/v2/token?=$ART_USERNAME&scope=repository:$registry_opts/$repository_name:pull&service=registry.crowdstrike.com" -K-)
curl -s -L "https://$cs_registry/v2/token?=$ART_USERNAME&scope=repository:$registry_opts/$repository_name:pull&service=$cs_registry" -K-)
handle_curl_error $?
registry_bearer=$(echo "$bearer_result" | json_value "token" | sed 's/ *$//g' | sed 's/^ *//g')
# Check if registry_bearer is not empty
Expand Down Expand Up @@ -612,11 +612,17 @@ elif [ "${SENSOR_TYPE}" = "falcon-jobcontroller" ]; then
IMAGE_NAME="falcon-jobcontroller"
repository_name="$BUILD_STAGE/falcon-jobcontroller"
registry_opts="falcon-selfhostedregistryassessment"
if [ "${FALCON_CLOUD}" = "us-gov-1" ]; then
registry_opts="${registry_opts}/gov1"
fi
elif [ "${SENSOR_TYPE}" = "falcon-registryassessmentexecutor" ]; then
# overrides for Registry Assessment Executor
IMAGE_NAME="falcon-registryassessmentexecutor"
repository_name="$BUILD_STAGE/falcon-registryassessmentexecutor"
registry_opts="falcon-selfhostedregistryassessment"
if [ "${FALCON_CLOUD}" = "us-gov-1" ]; then
registry_opts="${registry_opts}/gov1"
fi
fi

#Set Docker token using the BEARER token captured earlier
Expand Down

0 comments on commit a49f2c7

Please sign in to comment.