Skip to content

Commit

Permalink
now updates the file-server chart on release
Browse files Browse the repository at this point in the history
  • Loading branch information
runeanielsen committed Jan 16, 2025
1 parent 8c19225 commit 04d6ca4
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ executors:
auth:
username: $DOCKER_LOGIN
password: $DOCKER_ACCESSTOKEN
alpine-git:
environment:
IMAGE_NAME: daxgrid/file-server
CHART_PATH: ./dax/file-server
GIT_USER_NAME: "dax-bot"
GIT_USER_EMAIL: "admin@dax.dk"
GIT_CLONE_REPO: "git@github.com:DAXGRID/dax-charts.git"
SSH_FINGERPRINT: "SHA256:Vj5T6eRfAwZ5HSntxj0qsSpkAFqkr62MBHQE1teDJpI"
docker:
- image: alpine/git

jobs:
build-app:
Expand Down Expand Up @@ -57,6 +67,31 @@ jobs:
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$IMAGE_TAG
docker push $IMAGE_NAME:latest
docker push $IMAGE_NAME:$IMAGE_TAG
update-helm-chart:
executor: alpine-git
steps:
- checkout
- add_ssh_keys:
fingerprints:
- $SSH_FINGERPRINT
- run:
name: key-scan
command: ssh-keyscan github.com >> ~/.ssh/known_hosts
- run:
name: git clone charts repo
command: git clone $GIT_CLONE_REPO
- run:
name: package and push
command: |
apk add bash
IMAGE_TAG_NO_V=${CIRCLE_TAG:1}
cd ./dax-charts
git config user.email $GIT_USER_EMAIL
git config user.name $GIT_USER_NAME
./scripts/update-chart-version.sh $CHART_PATH $IMAGE_TAG_NO_V
git add .
git commit -m "upgrades $IMAGE_NAME to version $CIRCLE_TAG"
git push
workflows:
build-upload_image:
Expand All @@ -83,3 +118,12 @@ workflows:
only: /^v.*/
branches:
ignore: /.*/
- update-helm-chart:
context: docker
requires:
- docker-publish-image
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/

0 comments on commit 04d6ca4

Please sign in to comment.