File tree Expand file tree Collapse file tree 5 files changed +66
-96
lines changed Expand file tree Collapse file tree 5 files changed +66
-96
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ jobs:
166
166
name : Notify Slack on failure
167
167
when : on_fail
168
168
working_directory : ~/kubernetes-monitor
169
- deploy_to_dev :
169
+ prepare_to_deploy :
170
170
docker :
171
171
- auth :
172
172
password : $DOCKERHUB_PASSWORD
@@ -176,7 +176,7 @@ jobs:
176
176
- checkout
177
177
- install_python_requests
178
178
- run :
179
- command : ./scripts/circleci-jobs/deploy_to_dev .sh
179
+ command : ./scripts/circleci-jobs/prepare_to_deploy .sh
180
180
name : Deploy to dev
181
181
- run :
182
182
command : ./scripts/slack/notify_failure.py "${CIRCLE_BRANCH}" "${CIRCLE_JOB}" "${CIRCLE_BUILD_URL}" "${CIRCLE_PULL_REQUEST}" "${SLACK_WEBHOOK}"
@@ -1099,7 +1099,7 @@ workflows:
1099
1099
- build_and_upload_operator
1100
1100
- unit_tests
1101
1101
- system_tests
1102
- - deploy_to_dev :
1102
+ - prepare_to_deploy :
1103
1103
context : team-container-integration
1104
1104
filters :
1105
1105
branches :
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ workflows:
100
100
# - integration_tests_helm
101
101
# - integration_tests_proxy
102
102
<< : *staging_branch_only_filter
103
- - deploy_to_dev :
103
+ - prepare_to_deploy :
104
104
context : team-container-integration
105
105
requires :
106
106
- tag_and_push
Original file line number Diff line number Diff line change 10
10
11
11
- run :
12
12
name : Deploy to dev
13
- command : ./scripts/circleci-jobs/deploy_to_dev .sh
13
+ command : ./scripts/circleci-jobs/prepare_to_deploy .sh
14
14
15
15
- run :
16
16
name : Notify Slack on failure
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ # Getting latest released tag
5
+ LATEST_TAG_WITH_V=` git describe --abbrev=0 --tags ${CIRCLE_SHA1} `
6
+ LATEST_TAG=${LATEST_TAG_WITH_V: 1}
7
+
8
+ # Config git
9
+ git config --global user.email
" [email protected] "
10
+ git config --global user.name " K-M Deploy Boy"
11
+
12
+ # Clone repo
13
+ git clone https://$GH_TOKEN @github.com/snyk/$KUBERNETES_MONITOR_DEPLOYER_REPO .git
14
+
15
+ # Copy contents from snyk-monitor/ folder into deployer helm/ folder in github
16
+ cp -r snyk-monitor/* $KUBERNETES_MONITOR_DEPLOYER_REPO /helm
17
+
18
+ # Replace Chart.yaml with the Chart.yaml from the deployer repo
19
+ echo $KUBERNETES_MONITOR_DEPLOYER_REPO /Chart.yaml >> $KUBERNETES_MONITOR_DEPLOYER_REPO /helm/Chart.yaml
20
+
21
+ # Create environment values file(s)
22
+ cat > $KUBERNETES_MONITOR_DEPLOYER_REPO /helm/values/$PRODUCTION_YAML_FILE_NAME .yaml << EOF
23
+ clusterName: "Production cluster"
24
+ skip_k8s_jobs: true
25
+
26
+ requests:
27
+ memory: "4Gi"
28
+
29
+ limits:
30
+ memory: "4Gi"
31
+
32
+ policyOrgs:
33
+ - $POLICY_ORG_PROD
34
+
35
+ image:
36
+ tag: $LATEST_TAG
37
+
38
+ skopeo:
39
+ compression:
40
+ level: 1
41
+
42
+ workers:
43
+ count: 5
44
+
45
+ metadata:
46
+ annotations:
47
+ github.com/project-slug: snyk/kubernetes-monitor
48
+ github.com/team-slug: snyk/container-integration
49
+ labels:
50
+ $SNYK_OWNER_LABEL_KEY : $SNYK_OWNER_LABEL_VALUE
51
+ $SNYK_LOG_DEST_LABEL_KEY : $SNYK_LOG_DEST_LABEL_VALUE
52
+
53
+ EOF
54
+
55
+ # Add extra values
56
+ echo $KUBERNETES_MONITOR_DEPLOYER_REPO /extra-production-values.yaml > $KUBERNETES_MONITOR_DEPLOYER_REPO /helm/values/$PRODUCTION_YAML_FILE_NAME .yaml
57
+
58
+
59
+ cd $KUBERNETES_MONITOR_DEPLOYER_REPO
60
+ git commit --allow-empty -am " feat: deploy k-m $LATEST_TAG_WITH_V "
61
+ git push origin main
You can’t perform that action at this time.
0 commit comments