Generate version.json in circle.yml for pipeline v2 (#4168)

Also copy the generated file to /app/version.json in Docker.deploy so it
complies with pipeline v2 standard.
This commit is contained in:
bqbn 2016-12-22 12:42:41 -08:00 коммит произвёл GitHub
Родитель 6ffb53d47a
Коммит 7d9c3ebbc6
2 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -36,6 +36,14 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
# The pipeline v2 standard requires the existence of /app/version.json
# inside the docker image, although the content of the file comes from
# circle.yml.
# We realize that the content of version.json is written twice (once in
# circle.yml, and the other in the end of this file), we should remove
# the bits at the end of this file after we fully migrate to use pipeline
# v2.
COPY version.json /app/version.json
COPY . /data/olympia
WORKDIR /data/olympia

Просмотреть файл

@ -7,6 +7,14 @@ machine:
dependencies:
override:
- docker version
- >
printf '{"commit":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}\n'
"$CIRCLE_SHA1"
"$CIRCLE_TAG"
"$CIRCLE_PROJECT_USERNAME"
"$CIRCLE_PROJECT_REPONAME"
"$CIRCLE_BUILD_URL"
> version.json
- docker build -t app:build -f Dockerfile.deploy .
- pip install tox mozdownload mozinstall