Skip to content

Commit 8ea944d

Browse files
authored
default disable ci cache & conditional cf-keypairs (#6)
* default disable ci cache & conditional cf-keypairs - package lock is actually required for circleCI to cache, it throws without the key, see https://circleci.com/developer/orbs/orb/circleci/node#commands-install-package - so now it will just npm install instead of trying to restore cache, left commented block for user to switch to instead - since CF keypairs are now optionally generated, the injection should also be optionally done
1 parent 0b1cf9b commit 8ea944d

File tree

5 files changed

+2305
-8
lines changed

5 files changed

+2305
-8
lines changed

templates/.circleci/config.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,16 @@ jobs:
112112
steps: # steps that comprise the `build` job
113113
- attach_workspace:
114114
at: *workspace
115-
- node/install-packages:
116-
cache-path: "./node_modules"
117-
app-dir: .
115+
## This `npm install` step is used so boilerplate can pick up latest version before locking
116+
## and also allow variances of database drivers to be not part of the package-lock.json
117+
## Once you commit your package-lock.json you can retire this step for the cached version
118+
## 1. remove npm i --package-lock step
119+
## 2. use the commented node/install-packages instead
120+
- run:
121+
command: npm install
122+
# - node/install-packages:
123+
# cache-path: "./node_modules"
124+
# app-dir: .
118125
- run:
119126
name: Generating env file
120127
command: cp .env.example .env
@@ -132,9 +139,16 @@ jobs:
132139
steps:
133140
- attach_workspace:
134141
at: *workspace
135-
- node/install-packages:
136-
cache-path: "./node_modules"
137-
app-dir: .
142+
## This `npm install` step is used so boilerplate can pick up latest version before locking
143+
## and also allow variances of database drivers to be not part of the package-lock.json
144+
## Once you commit your package-lock.json you can retire this step for the cached version
145+
## 1. remove npm i --package-lock step
146+
## 2. use the commented node/install-packages instead
147+
- run:
148+
command: npm install
149+
# - node/install-packages:
150+
# cache-path: "./node_modules"
151+
# app-dir: .
138152
- run: npm run lint
139153

140154
build_and_push:

templates/kubernetes/base/deployment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spec:
4747
valueFrom:
4848
fieldRef:
4949
fieldPath: metadata.name
50-
- name: CF_KEYPAIR_ID
50+
<% if eq (index .Params `fileUploads`) "yes" %> - name: CF_KEYPAIR_ID
5151
valueFrom:
5252
secretKeyRef:
5353
name: cf-keypair
@@ -57,7 +57,7 @@ spec:
5757
secretKeyRef:
5858
name: cf-keypair
5959
key: private_key
60-
- name: DATABASE_USERNAME
60+
<% end %> - name: DATABASE_USERNAME
6161
valueFrom:
6262
secretKeyRef:
6363
name: <% .Name %>

0 commit comments

Comments
 (0)