@leverege/build-tools 2.18.0-beta.2 → 2.18.0-beta.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.18.0-beta.2",
3
+ "version": "2.18.0-beta.4",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -22,7 +22,6 @@
22
22
  "bin": {
23
23
  "build-tools": "src/build-tools.js",
24
24
  "circleate": "src/circleate",
25
- "decrypt-env-to-pipeline": "src/decrypt-env-to-pipeline",
26
25
  "decrypt-secrets": "src/decrypt-secrets",
27
26
  "dirty-git": "src/dirty-git",
28
27
  "dockreate": "src/dockreate",
@@ -57,16 +57,20 @@ initialize_gcloud() {
57
57
  }
58
58
 
59
59
  function decryptEnvToPipeline() {
60
- gcloud --quiet config set project ${GOOGLE_PROJECT}
61
- gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE}
60
+ echo "------------- BitBucket Pipeline Detected -------------"
61
+ printf " GCLOUD_PROJECT [$GCLOUD_PROJECT]\n"
62
+ printf " GCLOUD_COMPUTE_ZONE [$GCLOUD_COMPUTE_ZONE]\n"
63
+
64
+ gcloud --quiet config set project ${GCLOUD_PROJECT}
65
+ gcloud --quiet config set compute/zone ${GCLOUD_COMPUTE_ZONE}
62
66
  echo ${GCLOUD_SERVICE_KEY} | gcloud auth activate-service-account --key-file=-
63
67
 
64
68
  # decrypt .env.enc file
65
69
  gcloud kms decrypt \
66
- --project $GOOGLE_PROJECT \
70
+ --project $GCLOUD_PROJECT \
67
71
  --key circle-ci \
68
72
  --keyring build-tools \
69
- --location $GOOGLE_COMPUTE_ZONE \
73
+ --location $GCLOUD_COMPUTE_ZONE \
70
74
  --plaintext-file .env \
71
75
  --ciphertext-file .env.enc
72
76
 
@@ -78,6 +82,8 @@ if [ "$1" == "-h" ]; then
78
82
  exit 1
79
83
  fi
80
84
 
85
+ printf "BITBUCKETCI=[$BITBUCKETCI] CIRCLECI=[$CIRCLECI]\n"
86
+
81
87
  if [ "$BITBUCKETCI" == "true" ];
82
88
  then
83
89
  decryptEnvToPipeline