Skip to content

Commit

Permalink
Merge pull request #1409 from GSA/1407-service-clean-fix
Browse files Browse the repository at this point in the history
1407 service clean fix
  • Loading branch information
XavierMetichecchia authored Jun 10, 2024
2 parents b31b823 + a357b00 commit ab40ef8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/cloudgov-cleanup-old-service-keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ jobs:
run: |
source ./scripts/pipeline/cloud-gov-login.sh
source ./scripts/pipeline/cloud-gov-cleanup-service-keys.sh
2 changes: 1 addition & 1 deletion scripts/pipeline/cloud-gov-cleanup-service-keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

service="${PROJECT}-backup-${ENVIRONMENT}"
service="${PROJECT}-backup-${BRANCH}"

raw_keys=$(cf service-keys "${service}" | sed 1,3d | awk '{print $1}')
service_keys=("${raw_keys}")
Expand Down
6 changes: 3 additions & 3 deletions scripts/pipeline/cloud-gov-login.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash

echo "Logging into Cloud.gov..."
{
{
cf login \
-a https://api.fr.cloud.gov \
-u "${CF_USER}" \
-p "${CF_PASSWORD}" \
-o "${CF_ORG}" \
-s "${PROJECT}-${BRANCH}" > login.log || login_error=1
} >/dev/null 2>&1
} >/dev/null 2>&1

[ -n "${login_error}" ] && echo "Error logging into Cloud.gov!" && exit 1

echo "Login successful!"
echo "Login successful!"

0 comments on commit ab40ef8

Please sign in to comment.