@leverege/build-tools 2.18.0-beta.5 → 2.18.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
package/package.json
CHANGED
package/src/decrypt-secrets
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
|
|
2
|
+
printf "\n_______STARTING_DECRYPT_SECRETS__________\n" # XXX
|
|
3
|
+
what_the_actual_fuck_you_fucking_fucks
|
|
4
|
+
|
|
3
5
|
display_usage() {
|
|
4
6
|
echo "This script decrypts files using Google KMS."
|
|
5
7
|
echo -e "\nInputs: .env.enc and secrets.tar.gz.enc (if it exists) \n"
|
|
@@ -58,9 +60,9 @@ initialize_gcloud() {
|
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
function decryptEnvToPipeline() {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
printf "------------- BitBucket Pipeline Detected -------------\n"
|
|
64
|
+
printf " GCLOUD_PROJECT [$GCLOUD_PROJECT]\n"
|
|
65
|
+
printf " GCLOUD_COMPUTE_ZONE [$GCLOUD_COMPUTE_ZONE]\n"
|
|
64
66
|
|
|
65
67
|
gcloud --quiet config set project ${GCLOUD_PROJECT}
|
|
66
68
|
gcloud --quiet config set compute/zone ${GCLOUD_COMPUTE_ZONE}
|
|
@@ -83,7 +85,7 @@ if [ "$1" == "-h" ]; then
|
|
|
83
85
|
exit 1
|
|
84
86
|
fi
|
|
85
87
|
|
|
86
|
-
|
|
88
|
+
printf "\nBITBUCKETCI=[$BITBUCKETCI] CIRCLECI=[$CIRCLECI]\n"
|
|
87
89
|
|
|
88
90
|
if [ "$BITBUCKETCI" == "true" ];
|
|
89
91
|
then
|
|
@@ -95,7 +97,7 @@ if [ "$CIRCLECI" == "true" ]; then
|
|
|
95
97
|
initialize_gcloud
|
|
96
98
|
fi
|
|
97
99
|
|
|
98
|
-
|
|
100
|
+
printf "\nXXXXXXXXXX SHOULD NOT BE HERE XXXXXXXXXX\n" && exit 0 # XXX
|
|
99
101
|
|
|
100
102
|
git_origin=`git config --get remote.origin.url`
|
|
101
103
|
|
|
@@ -106,7 +108,7 @@ else
|
|
|
106
108
|
fi
|
|
107
109
|
|
|
108
110
|
# Set project based on org name
|
|
109
|
-
printf "\
|
|
111
|
+
printf "\nSON OF A BITCH XXX - Detecting organization name...\n"
|
|
110
112
|
|
|
111
113
|
if [ "$git_orgname" = "leverege" ]; then
|
|
112
114
|
printf "\nUsing leverege\n\n"
|