Skip to content

Commit

Permalink
feat: release (#160)
Browse files Browse the repository at this point in the history
* feat(helm) release

* fix: tag image
  • Loading branch information
Dav-14 authored Oct 11, 2024
1 parent 51304be commit df7ca6c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ jobs:
--secret FURY_TOKEN=$FURY_TOKEN
--secret GORELEASER_KEY=$GORELEASER_KEY
${{ contains(github.event.pull_request.labels.*.name, 'no-cache') && '--no-cache' || '' }}
+release --mode=release
+release --mode=release --VERSION=$TAG
env:
GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
TAG: ${{ github.ref_name }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ Dockerfile.cross
*~

charts

*.tgz
13 changes: 11 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ generate-mock:
helm-update:
FROM core+builder-image
RUN curl -s https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh | bash -s -- 4.5.4 /bin
RUN apk add helm
RUN apk add helm yq

WORKDIR /src
COPY --pass-args (+manifests/config) /src/config
Expand All @@ -78,9 +78,17 @@ helm-update:

RUN rm -f helm/operator/templates/gen/v1_namespace*.yaml
RUN rm -f helm/operator/templates/gen/apps_v1_deployment_*.yaml

ARG VERSION="v2.0.19"
FOR dir IN $(ls -d helm/*/)
RUN yq -i ".version=\"${VERSION}\"" ${dir}Chart.yaml
RUN yq -i ".appVersion=\"${VERSION}\"" ${dir}Chart.yaml
IF [ "$dir" = "helm/operator/" ]
RUN yq -i ".dependencies[0].version=\"${VERSION}"\" ${dir}Chart.yaml
END
END
RUN helm dependencies update ./helm/operator


SAVE ARTIFACT helm AS LOCAL helm

deploy:
Expand Down Expand Up @@ -234,3 +242,4 @@ release:
ARG mode=local
COPY --dir . /src
DO core+GORELEASER --mode=$mode
BUILD +helm-publish
7 changes: 2 additions & 5 deletions helm/crds/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ maintainers:
- name: "Formance Team"
email: "[email protected]"
icon: "https://avatars.githubusercontent.com/u/84325077?s=200&v=4"

type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: v2.1.0-beta.1

version: v2.0.19
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v2.1.0-beta.1
appVersion: v2.0.19
6 changes: 3 additions & 3 deletions helm/operator/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: operator-crds
repository: file://../crds
version: v2.1.0-beta.1
digest: sha256:466e804e65bcff5acfc01b30687c54d82c5590e2c0f4914b1667c1cdde3a1a31
generated: "2024-09-10T10:31:01.470558289Z"
version: v2.0.19
digest: sha256:e7b2a39869bf5eadbb10d33c86189d614287df7c4ac851e7f02f956ab50561ba
generated: "2024-10-11T14:26:27.064195792Z"
10 changes: 3 additions & 7 deletions helm/operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,18 @@ maintainers:
- name: "Formance Team"
email: "[email protected]"
icon: "https://avatars.githubusercontent.com/u/84325077?s=200&v=4"

type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: v2.1.0-beta.1

version: "v2.0.19"
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v2.1.0-beta.1

appVersion: v2.0.19
dependencies:
- name: operator-crds
version: v2.1.0-beta.1
version: v2.0.19
repository: "file://../crds"
condition: operator-crds.create
2 changes: 1 addition & 1 deletion helm/operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
repository: ghcr.io/formancehq/operator
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: v2.1.0-beta.1
tag: ""

imagePullSecrets: []
nameOverride: ""
Expand Down

0 comments on commit df7ca6c

Please sign in to comment.