Skip to content

Commit 62894d3

Browse files
authored
Merge pull request #405 from snyk/chore/cleanup-tested-operators
chore/cleanup tested operators
2 parents 645d01c + 937fd47 commit 62894d3

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.circleci/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ jobs:
250250
export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=snyk/kubernetes-monitor:${IMAGE_TAG}-${CIRCLE_SHA1} &&
251251
docker pull ${KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG} &&
252252
.circleci/do-exclusively --branch staging --job ${CIRCLE_JOB} npm run test:integration:openshift4
253+
- run:
254+
name: Delete Operator from Quay
255+
command: |
256+
./scripts/delete-operator-from-quay.sh
257+
when: always
253258
- run:
254259
name: Notify Slack on failure
255260
command: |
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#! /bin/bash
2+
3+
set -e
4+
5+
QUAY_TOKEN=$(curl -H "Content-Type: application/json" -XPOST https://quay.io/cnr/api/v1/users/login -d "{\"user\": {\"username\": \"${QUAY_USERNAME}\", \"password\": \"${QUAY_PASSWORD}\"}}" | jq -r .token)
6+
OPERATOR_VERSION="0.0.1-${CIRCLE_SHA1}"
7+
8+
STATUSCODE=$( curl --silent --output /dev/stderr --write-out "%{http_code}" -XDELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: $QUAY_TOKEN" "https://quay.io/cnr/api/v1/packages/snyk-runtime/snyk-operator/${OPERATOR_VERSION}/helm" )
9+
10+
if test $STATUSCODE -ge 300; then
11+
echo "Unexpected status code $STATUSCODE"
12+
exit 1
13+
fi

0 commit comments

Comments
 (0)