Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use image tag for app version #486

Merged
merged 2 commits into from
Feb 6, 2025
Merged

feat: use image tag for app version #486

merged 2 commits into from
Feb 6, 2025

Conversation

davidsauntson
Copy link
Contributor

@davidsauntson davidsauntson commented Feb 5, 2025

Follows on from #483

Fixes the APP_VERSION env var so that it is:

  • set directly in the deployment.yaml file
  • more explicitly linked to the IMAGE_TAG used in the docker build and push step

@@ -51,6 +51,8 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: APP_VERSION
value: {{ .Values.image.tag }}
Copy link
Contributor Author

@davidsauntson davidsauntson Feb 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unable to get the commit sha into the values.yaml or <stage>.yaml files. Neither the .Values.image.tag or the github.sha methods are available there. But I think it's fine here because it doesn't change per env anyway.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of interest, where is this env var used, is it for the app to knows its own version? I'm a bit confused about what this PR tries to achieve

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry - I've updated the description. It follows on from this PR #483

@davidsauntson davidsauntson merged commit 757437d into main Feb 6, 2025
10 checks passed
@davidsauntson davidsauntson deleted the fix/app-version branch February 6, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants