Skip to content

Commit a9c1c29

Browse files
authored
migration-to-gitops-repo (#99)
Co-authored-by: Alexey Gutkin <alexey.gutkin@dynatrace.com>
1 parent c5e8f2d commit a9c1c29

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.circleci/config.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,12 @@ jobs:
108108
- *load_version
109109
- *install_deps
110110
- run: git config --global user.email "sonario@rookout.com" && git config --global user.name "sonariorobot"
111-
- run: git clone -b staging git@github.com:Rookout/gitops-demo.git
112-
- run: PUBLISH_VERSION=$(echo $NEW_VERSION | sed 's/inner-999/1/g') yq -i -v '.tutorialNodejs.image.tag = strenv(PUBLISH_VERSION) | .sandboxNodejs.image.tag = strenv(PUBLISH_VERSION)' gitops-demo/argocd/apps/values.yaml
113-
- run: cd gitops-demo && git add argocd/apps/values.yaml
114-
- run: cd gitops-demo && git commit -m "update tutorial-nodejs $NEW_VERSION"
115-
- run: cd gitops-demo && git push https://sonariorobot:$GITHUB_TOKEN@github.com/Rookout/gitops-demo.git staging
116-
- run: cd gitops-demo && git checkout production && git pull
117-
- run: PUBLISH_VERSION=$(echo $NEW_VERSION | sed 's/inner-999/1/g') yq -i -v '.tutorialNodejs.image.tag = strenv(PUBLISH_VERSION) | .sandboxNodejs.image.tag = strenv(PUBLISH_VERSION)' gitops-demo/argocd/apps/values.yaml
118-
- run: cd gitops-demo && git add argocd/apps/values.yaml
119-
- run: cd gitops-demo && git commit -m "update tutorial-nodejs $NEW_VERSION"
120-
- run: cd gitops-demo && git push https://sonariorobot:$GITHUB_TOKEN@github.com/Rookout/gitops-demo.git production
111+
- run: git clone git@github.com:Rookout/gitops.git
112+
- run: PUBLISH_VERSION=$(echo $NEW_VERSION | sed 's/inner-999/1/g') yq eval -i -v '.apps[] |= select(.chart.name == "tutorial-nodejs").helmValues.image.tag = strenv(PUBLISH_VERSION)' apps/demo/staging/apps.yaml
113+
- run: PUBLISH_VERSION=$(echo $NEW_VERSION | sed 's/inner-999/1/g') yq eval -i -v '.apps[] |= select(.chart.name == "tutorial-nodejs").helmValues.image.tag = strenv(PUBLISH_VERSION)' apps/demo/production/apps.yaml
114+
- run: cd gitops && git add apps/demo/staging/apps.yaml apps/demo/production/apps.yaml
115+
- run: cd gitops && git commit -m "update tutorial-nodejs $NEW_VERSION"
116+
- run: cd gitops && git push https://sonariorobot:$GITHUB_TOKEN@github.com/Rookout/gitops.git
121117

122118
test_demo_servers_up:
123119
docker:

0 commit comments

Comments
 (0)