palantir / atlasdb

Transactional Distributed Database Layer
https://palantir.github.io/atlasdb/
Apache License 2.0
45 stars 7 forks source link

[Antithesis] Add generated version.txt file to docker images #7066

Closed mdaudali closed 3 months ago

mdaudali commented 3 months ago

As requested internally, we want to have a version.txt file containing version information about the docker images we run in antithesis.

This change adds a version.txt satisfying the format "{commit hash} - {tagged version number}" to the workload server distribution on build. The tagged version number is only relevant when on the commit that we actually have a version release for, but we only publish to antithesis on published releases.

I opted to do this at build rather than dockerPrepare because a) it requires less changes to other files and b) CI was a teeny bit annoying so it swung me this way. Happy to just add it to dockerPrepare instead of build, I had no strong opinion here.

I chose to add it to var/metadata (which is git ignored!) rather than var for namespacing, but does mean the directory needs to be created at runtime, as shown below.

I have tested that it shows up in the relevant docker image! image