Skip to content

Commit ef57b24

Browse files
committed
chore: config git to have an author
1 parent cbc3333 commit ef57b24

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

scripts/circleci-jobs/deploy_to_dev.sh

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ set -e
33

44
# Getting latest released tag
55
LATEST_TAG_WITH_V=`git describe --abbrev=0 --tags ${CIRCLE_SHA1}`
6-
LATEST_TAG=${LATEST_TAG_WITH_V:1}-approved
6+
LATEST_TAG=${LATEST_TAG_WITH_V:1}
7+
LATEST_TAG_APPROVED=${LATEST_TAG}-approved
78

89
# Send Slack notification
9-
./scripts/slack/notify_deploy.py $LATEST_TAG dev
10+
./scripts/slack/notify_deploy.py $LATEST_TAG_APPROVED dev
11+
12+
# Config git
13+
git config --global user.email "[email protected]"
14+
git config --global user.name "K-M Deploy Boy"
1015

11-
# Deploy to pre-prod
1216
git clone https://$GH_TOKEN@github.com/snyk/$KUBERNETES_MONITOR_DEPLOYER_REPO.git
13-
mkdir -p $KUBERNETES_MONITOR_DEPLOYER_REPO/helm/values/
17+
18+
# Create helm values for different envs
1419
cat >$KUBERNETES_MONITOR_DEPLOYER_REPO/helm/values/pre-prod-mt.yaml <<EOF
1520
clusterName: "Development cluster"
1621
integrationApi: https://kubernetes-upstream.dev.snyk.io
@@ -20,6 +25,29 @@ skip_k8s_jobs: true
2025
policyOrgs:
2126
- $POLICY_ORG_PRE_PROD
2227
28+
image:
29+
tag: $LATEST_TAG_APPROVED
30+
31+
skopeo:
32+
compression:
33+
level: 1
34+
35+
workers:
36+
count: 5
37+
38+
EOF
39+
40+
cat >$KUBERNETES_MONITOR_DEPLOYER_REPO/helm/values/prod-mt.yaml <<EOF
41+
clusterName: "Production cluster"
42+
log_level: "DEBUG"
43+
skip_k8s_jobs: true
44+
45+
limit:
46+
memory: "4Gi"
47+
48+
policyOrgs:
49+
- $POLICY_ORG_PROD
50+
2351
image:
2452
tag: $LATEST_TAG
2553
@@ -31,6 +59,7 @@ workers:
3159
count: 5
3260
3361
EOF
34-
cd $KUBERNETES_MONITOR_DEPLOYER_REPO &&
35-
git commit -am "feat: deploy to dev k-m $LATEST_TAG_WITH_V" &&
62+
63+
cd $KUBERNETES_MONITOR_DEPLOYER_REPO
64+
git commit --allow-empty -am "feat: deploy k-m $LATEST_TAG_WITH_V"
3665
git push origin main

0 commit comments

Comments
 (0)