@@ -154,7 +154,7 @@ jobs:
154154 name : Notify Slack on failure
155155 when : on_fail
156156 working_directory : ~/kubernetes-monitor
157- deploy_dev :
157+ deploy_to_dev :
158158 docker :
159159 - auth :
160160 password : $DOCKERHUB_PASSWORD
@@ -178,7 +178,7 @@ jobs:
178178 name : Notify Slack on failure
179179 when : on_fail
180180 working_directory : ~/kubernetes-monitor
181- deploy_prod :
181+ deploy_to_prod :
182182 docker :
183183 - auth :
184184 password : $DOCKERHUB_PASSWORD
@@ -201,6 +201,47 @@ jobs:
201201 name : Notify Slack on failure
202202 when : on_fail
203203 working_directory : ~/kubernetes-monitor
204+ deploy_to_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
@@ -1026,7 +1067,7 @@ workflows:
10261067 branches :
10271068 only :
10281069 - master
1029- - deploy_prod :
1070+ - deploy_to_prod :
10301071 filters :
10311072 branches :
10321073 only :
@@ -1126,7 +1167,14 @@ workflows:
11261167 - integration_tests
11271168 - integration_tests_helm
11281169 - integration_tests_proxy
1129- - deploy_dev :
1170+ - deploy_to_dev :
1171+ filters :
1172+ branches :
1173+ only :
1174+ - staging
1175+ requires :
1176+ - tag_and_push
1177+ - deploy_to_sysdig_integration_cluster :
11301178 filters :
11311179 branches :
11321180 only :
0 commit comments