Commit 0281a4af authored by Tom Powell's avatar Tom Powell

include version

parent de5d1de9
Pipeline #38637281 failed with stages
in 5 minutes and 1 second
......@@ -22,7 +22,7 @@ build:
DOCKER_DRIVER: overlay2
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build . -t $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
- docker build --build-arg VERSION=$CI_COMMIT_SHA . -t $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
- docker push $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
- docker tag $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest
......
FROM python:3-alpine
ARG VERSION=dev
ENV VERSION=$VERSION
COPY . /app
WORKDIR /app
......
......@@ -27,6 +27,15 @@ gerrit = GerritServer(app.config['GERRIT_URL'])
extras_data = json.loads(open(app.config['EXTRAS_BLOB'], "r").read())
##########################
# jinja2 globals
##########################
def version():
return os.environ.get("VERSION", "dev")[:6]
app.jinja_env.globals.update(version=version)
##########################
# Metrics!
##########################
......
......@@ -94,7 +94,7 @@
<div class="footer-copyright">
<div class="container">
© 2017-{{ year }} LineageOS. Licensed under Apache 2.0.
<a class="grey-text text-lighten-4 right" href="https://github.com/lineageos-infra/updater">Source</a>
<a class="grey-text text-lighten-4 right" href="https://gitlab.com/lineageos/infra/updater">Source (version: {{version()}})</a>
</div>
</div>
</footer>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment