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 tag $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:$CI_PIPELINE_IID
FROM python:3.6
+ARG VERSION=dev
+
+ENV VERSION=$VERSION
+
COPY . /app
WORKDIR /app
RUN pip install gunicorn
headers = {'Private-Token': os.environ.get('GITLAB_TOKEN', '')}
+def version():
+ return os.environ.get("VERSION", "dev")[:6]
+
+app.jinja_env.globals.update(version=version)
+
def parse_args():
args = {}
if request.args:
.pagination li a, .pagination li a:focus, .pagination li a:hover {
color: #167c80;
}
+.footer {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ height: 60px;
+ line-height: 60px;
+ background-color: #167c80;
+ color: white;
+ display: flex;
+ justify-content: space-between;
+ width: 100%;
+
+}
+
+.footer a {
+ color: white;
+}
\ No newline at end of file
</table>
{{render_pagination(builds)}}
</div>
+{% include "footer.html" %}
{% endblock %}
--- /dev/null
+{% block footer %}
+<footer class="footer">
+ <span>© 2017-2018 LineageOS. Licensed under Apache 2.0.</span>
+ <span><a href="https://gitlab.com/lineageos/infra/builds-ui">Source</a> (version: {{version()}})</span>
+</footer>
+{% endblock %}
\ No newline at end of file
</table>
{{render_pagination(builds)}}
</div>
+{% include "footer.html" %}
{% endblock %}
{% endfor %}
</table>
</div>
+{% include "footer.html" %}
{% endblock %}
{% endfor %}
</div>
+{% include "footer.html" %}
{% endblock %}