@@ -42,17 +42,11 @@ jobs:
4242 - checkout
4343 - setup_remote_docker
4444 - install_python_requests
45- - run :
46- command : pip install operator-courier==2.1.7
47- name : Install operator-courier
4845 - run :
4946 command : |
50- RELEASE_VERSION=v0.15.1
51- DOWNLOAD_LOCATION=./operator-sdk
52- CURL_FOLLOW_REDIRECTS="-L"
53- curl ${CURL_FOLLOW_REDIRECTS} https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu -o ${DOWNLOAD_LOCATION}
54- chmod +x ${DOWNLOAD_LOCATION}
55- name : Download Operator SDK
47+ scripts/operator/download_operator_sdk.py
48+ scripts/operator/download_operator_package_manager.py
49+ name : Download Operator SDK and Operator Package Manager
5650 - run :
5751 command : |
5852 export IMAGE_TAG=$([[ "$CIRCLE_BRANCH" == "staging" ]] && echo "staging-candidate" || echo "discardable")
@@ -71,16 +65,10 @@ jobs:
7165 name : Package Operator Bundle
7266 - run :
7367 command : |
74- if [ "$CIRCLE_BRANCH" != "staging" ]; then
75- exit 0
76- fi
77- export QUAY_TOKEN=$(scripts/operator/get_quay_token.py "${QUAY_USERNAME}" "${QUAY_PASSWORD}")
7868 export OPERATOR_DIR=$OPERATOR_PATH
79- export QUAY_NAMESPACE=snyk-runtime
80- export PACKAGE_NAME=snyk-operator
8169 export PACKAGE_VERSION="0.0.1-${CIRCLE_SHA1}"
82- operator-courier push "${OPERATOR_DIR}" "${QUAY_NAMESPACE }" "${PACKAGE_NAME }" "${PACKAGE_VERSION}" "${QUAY_TOKEN }"
83- name : Upload Operator to Quay
70+ scripts/ operator/create_operator_bundle_and_index_and_push.py "${OPERATOR_DIR}" "${PACKAGE_VERSION }" "${DOCKERHUB_USER }" "${DOCKERHUB_PASSWORD }"
71+ name : Create Operator Bundle and Index and push to Docker Hub
8472 - run :
8573 command : |
8674 ./scripts/slack/notify_failure_on_branch.py "${CIRCLE_BRANCH}" "${CIRCLE_JOB}" "${CIRCLE_BUILD_URL}" "${CIRCLE_PULL_REQUEST}" "${SLACK_WEBHOOK}"
@@ -109,21 +97,6 @@ jobs:
10997 name : Notify Slack on failure
11098 when : on_fail
11199 working_directory : ~/kubernetes-monitor
112- delete_operators_from_quay :
113- docker :
114- - auth :
115- password : $DOCKERHUB_PASSWORD
116- username : $DOCKERHUB_USER
117- image : circleci/python:3.9
118- steps :
119- - checkout
120- - install_python_requests
121- - run :
122- command : |
123- python3 scripts/operator/delete_operators_from_quay.py "${QUAY_USERNAME}" "${QUAY_PASSWORD}"
124- name : Delete Operators from Quay
125- when : always
126- working_directory : ~/kubernetes-monitor
127100 deploy_dev :
128101 docker :
129102 - auth :
@@ -266,11 +239,6 @@ jobs:
266239 export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
267240 .circleci/do-exclusively --branch staging --job ${CIRCLE_JOB} npm run test:integration:kindolm:operator
268241 name : Operator integration tests on plain k8s
269- - run :
270- command : |
271- scripts/operator/delete_operators_from_quay.py "${QUAY_USERNAME}" "${QUAY_PASSWORD}"
272- name : Delete Operators from Quay
273- when : always
274242 - run :
275243 command : |
276244 ./scripts/slack/notify_failure_on_branch.py "${CIRCLE_BRANCH}" "${CIRCLE_JOB}" "${CIRCLE_BUILD_URL}" "${CIRCLE_PULL_REQUEST}" "${SLACK_WEBHOOK}"
@@ -342,10 +310,7 @@ jobs:
342310 name : create temp dir for logs
343311 - run :
344312 command : |
345- echo "${OPENSHIFT4_ETC_HOSTS_ENTRY}" | sudo tee -a /etc/hosts
346- name : Append an entry to the test environment to /etc/hosts
347- - run :
348- command : |
313+ export OPERATOR_VERSION="0.0.1-${CIRCLE_SHA1}"
349314 export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
350315 .circleci/do-exclusively --branch staging --job ${CIRCLE_JOB} npm run test:integration:openshift4:operator
351316 name : Integration tests OpenShift 4
@@ -957,14 +922,6 @@ workflows:
957922 requires :
958923 - build_image
959924 - build_and_upload_operator
960- - delete_operators_from_quay :
961- filters :
962- branches :
963- only :
964- - staging
965- requires :
966- - integration_tests_operator_on_k8s
967- - openshift4_integration_tests
968925 - tag_and_push :
969926 filters :
970927 branches :
0 commit comments