Skip to content

Commit 2a0b274

Browse files
author
Arthur Granado
committed
chore: Include OpenShifh 4 integration test in pipeline
- Include in pipeline when merge to staging
1 parent b8af00e commit 2a0b274

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.circleci/config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,32 @@ jobs:
222222
fi
223223
when: on_fail
224224

225+
openshift4_integration_tests:
226+
<<: *default_machine_config
227+
steps:
228+
- checkout
229+
- run:
230+
name: INTEGRATION TESTS OpenShift 4
231+
command: |
232+
export NVM_DIR="/opt/circleci/.nvm" &&
233+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&
234+
nvm install v10 &&
235+
npm install &&
236+
docker login --username ${DOCKERHUB_USER} --password ${DOCKERHUB_PASSWORD} &&
237+
export IMAGE_TAG=$([[ "$CIRCLE_BRANCH" == "staging" ]] && echo "staging-candidate" || echo "discardable") &&
238+
export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=snyk/kubernetes-monitor:${IMAGE_TAG}-${CIRCLE_SHA1} &&
239+
docker pull ${KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG} &&
240+
.circleci/do-exclusively --branch staging npm run test:integration:openshift4
241+
- run:
242+
name: Notify Slack on failure
243+
command: |
244+
if [[ "$CIRCLE_BRANCH" == "staging" ]]; then
245+
./scripts/slack-notify-failure.sh "staging-openshift4-integration-tests-${CIRCLE_SHA1}"
246+
else
247+
echo "Current branch is $CIRCLE_BRANCH so skipping notifying Slack"
248+
fi
249+
when: on_fail
250+
225251
######################## MERGE TO STAGING ########################
226252
tag_and_push:
227253
<<: *default_container_config
@@ -350,6 +376,10 @@ workflows:
350376
requires:
351377
- build_image
352378
<<: *staging_branch_only_filter
379+
- openshift4_integration_tests:
380+
requires:
381+
- build_image
382+
<<: *staging_branch_only_filter
353383
- package_manager_test_apk:
354384
requires:
355385
- build_image

0 commit comments

Comments
 (0)