Create version.json via circle-ci
This commit is contained in:
Родитель
e1ac56af59
Коммит
d16064e69d
|
@ -14,13 +14,6 @@ WORKDIR /srv/code
|
|||
RUN rm -rf node_modules
|
||||
RUN ln -s /srv/node/node_modules
|
||||
|
||||
RUN GITREF=$(git rev-parse HEAD) \
|
||||
GITTAG=$(git name-rev --tags --name-only $GITREF) \
|
||||
SOURCE='https://github.com/mozilla/addons-frontend' && \
|
||||
echo "{\"source\": \"$SOURCE\", \
|
||||
\"version\": \"$GITTAG\", \
|
||||
\"commit\": \"$GITREF\"}" > version.json
|
||||
|
||||
ENV SERVER_HOST 0.0.0.0
|
||||
ENV SERVER_PORT 4000
|
||||
|
||||
|
|
|
@ -33,6 +33,15 @@ dependencies:
|
|||
# day to keep the cache size down.
|
||||
- I="image-$(date +%j).gz"; if [[ -e ~/docker/$I ]]; then echo "Loading $I"; pigz -d -c ~/docker/$I | docker load; fi
|
||||
|
||||
- >
|
||||
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 --pull -t addons-frontend .
|
||||
|
||||
- docker images
|
||||
|
|
Загрузка…
Ссылка в новой задаче