Skip to content

Commit

Permalink
no need to login to ECR? with docker
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Pickering <[email protected]>
  • Loading branch information
alexvpickering committed Jun 28, 2024
1 parent 06b5db3 commit 02500cf
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/deploy-infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -833,23 +833,17 @@ jobs:
--silent \
https://${FALCON_CLOUD_API}/oauth2/token | jq -cr '.access_token | values')
echo "HERE1"
# Get CrowdStrike registry username and password:
export FALCON_ART_USERNAME="fc-$(echo ${FALCON_CID} | awk '{ print tolower($0) }' | cut -d'-' -f1)"
echo "HERE2"
export FALCON_ART_PASSWORD=$(curl \
-X GET -H "authorization: Bearer ${FALCON_CS_API_TOKEN}" \
https://${FALCON_CLOUD_API}/container-security/entities/image-registry-credentials/v1 | jq -cr '.resources[].token | values')
echo "HERE3!!"
# Obtain a token to interact with the CrowdStrike private registry:
export REGISTRY_BEARER=$(curl -X GET -s -u "${FALCON_ART_USERNAME}:${FALCON_ART_PASSWORD}" \
"https://${FALCON_CONTAINER_REGISTRY}/v2/token?=fc-${CID}&scope=repository:falcon-sensor/${FALCON_REGION}/release/falcon-sensor:pull&service=${FALCON_CONTAINER_REGISTRY}" | jq -r '.token')
echo "HERE4!!!"
# Fetch the latest tag:
export SENSORTYPE=falcon-container
export FALCON_SENSOR_IMAGE_REPO="${FALCON_CONTAINER_REGISTRY}/${SENSORTYPE}/${FALCON_REGION}/release/${SENSORTYPE}"
Expand All @@ -858,8 +852,6 @@ jobs:
"https://${FALCON_CONTAINER_REGISTRY}/v2/${SENSORTYPE}/${FALCON_REGION}/release/falcon-sensor/tags/list" | \
jq -r '.tags[-1]')
echo "HERE5!!!"
# Push Container Images to Private Registry
# Configure your container registry
export MY_INTERNAL_CONTAINER_REGISTRY=falcon-sensor
Expand All @@ -870,9 +862,6 @@ jobs:
# Login to crowdstrike registry
echo $FALCON_ART_PASSWORD | docker login -u $FALCON_ART_USERNAME --password-stdin ${FALCON_CONTAINER_REGISTRY}
# Login to your internal registry
docker login ${MY_INTERNAL_CONTAINER_REGISTRY}
# Move images to your local registry
## Pull latest falcon-sensor image for daemonset deployment
Expand Down

0 comments on commit 02500cf

Please sign in to comment.