@@ -136,13 +136,10 @@ jobs:
136136 << : *default_machine_config
137137 steps :
138138 - checkout
139+ - setup_node12
139140 - run :
140141 name : Unit tests
141142 command : |
142- export NVM_DIR="/opt/circleci/.nvm" &&
143- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&
144- nvm install v12 &&
145- npm install &&
146143 npm run lint &&
147144 npm run build &&
148145 npm run test:unit
@@ -160,13 +157,10 @@ jobs:
160157 << : *default_machine_config
161158 steps :
162159 - checkout
160+ - setup_node12
163161 - run :
164162 name : System tests
165163 command : |
166- export NVM_DIR="/opt/circleci/.nvm" &&
167- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&
168- nvm install v12 &&
169- npm install &&
170164 npm run build &&
171165 npm run test:system
172166 - run :
@@ -183,20 +177,14 @@ jobs:
183177 << : *default_machine_config
184178 steps :
185179 - checkout
180+ - setup_node12
186181 - run :
187182 name : create temp dir for logs
188183 command : mkdir -p /tmp/logs/test/integration/kind
189184 - run :
190185 name : Integration tests
191186 command : |
192- export NVM_DIR="/opt/circleci/.nvm" &&
193- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&
194- nvm install v12 &&
195- npm install &&
196- docker login --username ${DOCKERHUB_USER} --password ${DOCKERHUB_PASSWORD} &&
197- export IMAGE_TAG=$([[ "$CIRCLE_BRANCH" == "staging" ]] && echo "staging-candidate" || echo "discardable") &&
198- export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=snyk/kubernetes-monitor:${IMAGE_TAG}-${CIRCLE_SHA1} &&
199- docker pull ${KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG} &&
187+ export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
200188 npm run test:integration
201189 - run :
202190 name : Notify Slack on failure
@@ -210,24 +198,43 @@ jobs:
210198 - store_artifacts :
211199 path : /tmp/logs/test/integration/kind
212200
201+ integration_tests_helm :
202+ << : *default_machine_config
203+ steps :
204+ - checkout
205+ - setup_node12
206+ - run :
207+ name : Create temporary directory for logs
208+ command : mkdir -p /tmp/logs/test/integration/kind-helm
209+ - run :
210+ name : Integration tests with Helm deployment
211+ command : |
212+ export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
213+ npm run test:integration:kind:helm
214+ - run :
215+ name : Notify Slack on failure
216+ command : |
217+ if [[ "$CIRCLE_BRANCH" == "staging" ]]; then
218+ ./scripts/slack-notify-failure.sh "staging-integration-helm-tests-${CIRCLE_SHA1}"
219+ else
220+ echo "Current branch is $CIRCLE_BRANCH so skipping notifying Slack"
221+ fi
222+ when : on_fail
223+ - store_artifacts :
224+ path : /tmp/logs/test/integration/kind-helm
225+
213226 eks_integration_tests :
214227 << : *default_machine_config
215228 steps :
216229 - checkout
230+ - setup_node12
217231 - run :
218232 name : Create temp dir for logs
219233 command : mkdir -p /tmp/logs/test/integration/eks
220234 - run :
221235 name : Integration tests EKS
222236 command : |
223- export NVM_DIR="/opt/circleci/.nvm" &&
224- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&
225- nvm install v12 &&
226- npm install &&
227- docker login --username ${DOCKERHUB_USER} --password ${DOCKERHUB_PASSWORD} &&
228- export IMAGE_TAG=$([[ "$CIRCLE_BRANCH" == "staging" ]] && echo "staging-candidate" || echo "discardable") &&
229- export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=snyk/kubernetes-monitor:${IMAGE_TAG}-${CIRCLE_SHA1} &&
230- docker pull ${KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG} &&
237+ export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
231238 .circleci/do-exclusively --branch staging --job ${CIRCLE_JOB} npm run test:integration:eks
232239 - run :
233240 name : Notify Slack on failure
@@ -252,7 +259,7 @@ jobs:
252259 - run :
253260 name : Integration tests OpenShift 3
254261 command : |
255- export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-openshift3- integration-tests.py)
262+ export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
256263 npm run test:integration:openshift3
257264 - run :
258265 name : Notify Slack on failure
@@ -265,6 +272,7 @@ jobs:
265272 << : *default_machine_config
266273 steps :
267274 - checkout
275+ - setup_node12
268276 - run :
269277 name : create temp dir for logs
270278 command : mkdir -p /tmp/logs/test/integration/openshift4
@@ -275,14 +283,7 @@ jobs:
275283 - run :
276284 name : Integration tests OpenShift 4
277285 command : |
278- export NVM_DIR="/opt/circleci/.nvm" &&
279- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&
280- nvm install v12 &&
281- npm install &&
282- docker login --username ${DOCKERHUB_USER} --password ${DOCKERHUB_PASSWORD} &&
283- export IMAGE_TAG=$([[ "$CIRCLE_BRANCH" == "staging" ]] && echo "staging-candidate" || echo "discardable") &&
284- export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=snyk/kubernetes-monitor:${IMAGE_TAG}-${CIRCLE_SHA1} &&
285- docker pull ${KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG} &&
286+ export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
286287 .circleci/do-exclusively --branch staging --job ${CIRCLE_JOB} npm run test:integration:openshift4
287288 - run :
288289 name : Delete Operator from Quay
@@ -434,6 +435,10 @@ workflows:
434435 requires :
435436 - build_image
436437 << : *main_branches_filter
438+ - integration_tests_helm :
439+ requires :
440+ - build_image
441+ << : *main_branches_filter
437442
438443 MERGE_TO_STAGING :
439444 jobs :
@@ -453,6 +458,10 @@ workflows:
453458 requires :
454459 - build_image
455460 << : *staging_branch_only_filter
461+ - integration_tests_helm :
462+ requires :
463+ - build_image
464+ << : *staging_branch_only_filter
456465 - eks_integration_tests :
457466 requires :
458467 - build_image
@@ -474,6 +483,7 @@ workflows:
474483 - unit_tests
475484 - system_tests
476485 - integration_tests
486+ - integration_tests_helm
477487 << : *staging_branch_only_filter
478488 - deploy_dev :
479489 requires :
0 commit comments