Comments (5)
In my Elixir projects I have:
Dockerfile:
# Setup access to version information
ARG BUILD_DATE=date
ARG VCS_REF=vcs
ENV BUILD_DATE=${BUILD_DATE}
ENV VCS_REF=${VCS_REF}
In the build, I use a custom action to pass the appropriate values for these args. I did these with a github action, but maybe we won't have to do that here(???): https://github.com/brianmay/docker-meta/blob/main/index.js
I notice I have an extra variable here for VERSION to which I don't consume. Curious. I may have forgotten to update the project. And there is a bit of logic here to pass the branch name, tag, or whatever to generate the version. I actually can't remember why I did it this way anymore.
You should be able to use these predefined variables: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
Then I read these values in the elixir config:
config :xxx,
build_date: System.get_env("BUILD_DATE"),
vcs_ref: System.get_env("VCS_REF"),
[...]
from teslamate.
We build our ghcr images with just pr-xxxx right now, innit?
So agree a commit id would be great
from teslamate.
If you want to change the version in a PR, just update the version file...
from teslamate.
We build our ghcr images with just pr-xxxx right now, innit?
So agree a commit id would be great
I think the image name is fine 👍 This way you can just pull without changing anything and get a new image from the PR.
The idea was to get some output indicating that it was actually updated (log and/or web)
If you want to change the version in a PR, just update the version file...
I always forget to update things like that :D
Maybe something like this could be nice where the version is detected automatically from the latest tag:
https://elixirforum.com/t/generating-app-mix-version-directly-from-git-tags/16685/7
And bumbed if not on tag. That means it would work for the edge image as well.
If no one beats me to it, I might try it out in a PR at some point :)
from teslamate.
Yeah, I used the version bumping in the past as well, but this will not update the log output in elixir from what I get, therefore TeslaMate uses the version file.
from teslamate.
Related Issues (20)
- feat: bundle MQTT data in one json blob HOT 8
- Wrong time zone for estimated charge end, TZ environment variable set correctly HOT 9
- New Model Y does not get discovered in version 1.28.3 HOT 1
- Model S MCU1 sleep issues HOT 16
- Battery Health - LFP - Status: 500. Message: convert frame from rows error: pq: division by zero HOT 4
- Has edge been updated? HOT 3
- TZ environment variable name confusion HOT 22
- Error on QNAP TS-231P3 HOT 1
- Some address could not be displayed HOT 1
- Battery Health not showing on new cars? HOT 1
- CI: update upload-artifact action HOT 15
- build: bump app base image to fix 'GLIBC_2.34' not found error HOT 6
- build: reduce the size of the Docker image by cleaning the APT cache
- New Tesla API for authentication HOT 1
- Drive state appears as online state while driving. HOT 3
- Internal server error due to "time_zone_not_found" HOT 9
- Programatic way to cancel sleep attempt HOT 10
- collation version mismatch HOT 4
- Grafana drive details map jumping back and forth HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teslamate.