Skip to content

Commit

Permalink
ROX-22599: Move secrets to RH GCP (#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavin-stackrox authored Jun 3, 2024
1 parent 7a13f1c commit ad9caa8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,23 +257,23 @@ bounce-argo-pods:
## Secrets ##
#############
.PHONY: secrets-download
secrets-download: pre-check
secrets-download:
@./scripts/deploy/secrets.sh download_secrets $(ENVIRONMENT)

.PHONY: secrets-upload
secrets-upload: pre-check
secrets-upload:
@./scripts/deploy/secrets.sh upload_secrets $(ENVIRONMENT) $(SECRET_VERSION)

.PHONY: secrets-show
secrets-show: pre-check
secrets-show:
@./scripts/deploy/secrets.sh show $(ENVIRONMENT) $(SECRET_VERSION)

.PHONY: secrets-edit
secrets-edit: pre-check
secrets-edit:
@./scripts/deploy/secrets.sh edit $(ENVIRONMENT) $(SECRET_VERSION)

.PHONY: secrets-revert
secrets-revert: pre-check
secrets-revert:
@./scripts/deploy/secrets.sh revert $(ENVIRONMENT) $(SECRET_VERSION)

##################
Expand Down
13 changes: 1 addition & 12 deletions scripts/deploy/secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,7 @@ TASK="$1"
ENVIRONMENT="$2"
SECRET_VERSION="${3:-latest}"

PROJECT="stackrox-infra"

check_not_empty() {
for V in "$@"; do
typeset -n VAR="$V"
if [ -z "${VAR:-}" ]; then
echo "ERROR: Variable $V is not set or empty"
exit 1
fi
done
}
PROJECT="${INFRA_GCP_PROJECT:-acs-team-automation}"

# Downloads secrets files for an ENVIRONMENT.
download_secrets() {
Expand Down Expand Up @@ -96,5 +86,4 @@ revert() {
upload_secrets
}

check_not_empty TASK ENVIRONMENT
eval "$TASK"

0 comments on commit ad9caa8

Please sign in to comment.