mozilla-services / contile

This is the back-end server for the Mozilla Tile Service (MTS)
https://mozilla-services.github.io/contile/
Mozilla Public License 2.0
19 stars 2 forks source link

[DISCO-2383] feat: Use SHA commit hash as version #551

Closed ncloudioj closed 1 year ago

ncloudioj commented 1 year ago

References

JIRA: DISCO-2383 GitHub: N/A

Description

This patch replaces all the version strings from Cargo.toml in Contile with $CIRCLECI_SHA1 including Sentry, logging, Dockerflow, and outbound traffic. Note that it uses the short SHA1 (the leading 7 characters) rather than the original 40 characters string.

PR Review Checklist

Put an x in the boxes that apply

Trinaa commented 1 year ago

In the CircleCI config write-version command we assign 'CIRCLE_TAG' to the 'version' field, should that be empty now?

ncloudioj commented 1 year ago

In the CircleCI config write-version command we assign 'CIRCLE_TAG' to the 'version' field, should that be empty now?

Per Circle's doc, it will be an empty string if the build was not tagged (which we will be doing onwards), so we're good here. FWIW, Merino uses the same for write-version and it returns.

$ curl https://merino.services.mozilla.com/__version__ | jq .

{
  "source": "https://github.com/mozilla-services/merino-py",
  "version": "",
  "commit": "4dd482f7faf1a6667c4770da85850bd463b64232",
  "build": "https://circleci.com/gh/mozilla-services/merino-py/8433"
}