@@ -201,6 +201,47 @@ jobs:
201201 name : Notify Slack on failure
202202 when : on_fail
203203 working_directory : ~/kubernetes-monitor
204+ deploy_sysdig_integration_cluster :
205+ docker :
206+ - auth :
207+ password : $DOCKERHUB_PASSWORD
208+ username : $DOCKERHUB_USER
209+ image : cimg/base:stable
210+ steps :
211+ - checkout
212+ - run :
213+ command : |
214+ LATEST_KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
215+ curl -LO "https://dl.k8s.io/release/${LATEST_KUBECTL_VERSION}/bin/linux/amd64/kubectl"
216+ curl -LO "https://dl.k8s.io/${LATEST_KUBECTL_VERSION}/bin/linux/amd64/kubectl.sha256"
217+ echo "$(<kubectl.sha256) kubectl" | sha256sum --check
218+ sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
219+ # Ensure the kubectl command is runnable
220+ kubectl version --client
221+ # Prepare kubeconfig to point to the cluster
222+ mkdir ~/.kube || true
223+ printf "%s" "${SYSDIG_KUBECONFIG}" | base64 -d > ~/.kube/config
224+ name : Install and prepare kubectl
225+ - run :
226+ command : |
227+ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
228+ chmod 700 get_helm.sh
229+ ./get_helm.sh
230+ # Ensure the Helm command is runnable
231+ helm version
232+ name : Install Helm
233+ - run :
234+ command : |
235+ LATEST_TAG_WITH_V=`git describe --abbrev=0 --tags ${CIRCLE_SHA1}`
236+ LATEST_TAG=${LATEST_TAG_WITH_V:1}-approved
237+ ./scripts/slack/notify_deploy.py $LATEST_TAG sysdig-integration-cluster
238+ helm upgrade --install snyk-monitor ./snyk-monitor --namespace snyk-monitor --set image.tag=${LATEST_TAG} --set clusterName="Sysdig cluster" --set sysdig.enabled=true
239+ name : Deploy to shared Sysdig cluster
240+ - run :
241+ command : ./scripts/slack/notify_failure.py "${CIRCLE_BRANCH}" "${CIRCLE_JOB}" "${CIRCLE_BUILD_URL}" "${CIRCLE_PULL_REQUEST}" "${SLACK_WEBHOOK}"
242+ name : Notify Slack on failure
243+ when : on_fail
244+ working_directory : ~/kubernetes-monitor
204245 eks_integration_tests :
205246 machine :
206247 docker_layer_caching : true
@@ -1133,6 +1174,13 @@ workflows:
11331174 - staging
11341175 requires :
11351176 - tag_and_push
1177+ - deploy_sysdig_integration_cluster :
1178+ filters :
1179+ branches :
1180+ only :
1181+ - staging
1182+ requires :
1183+ - tag_and_push
11361184 MONTHLY :
11371185 jobs :
11381186 - operator_upgrade_tests
0 commit comments