1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-22 12:21:31 +03:00

Ensure that the frontend is being built in production mode (#399)

* Travis ensure that the frontend is being built in production mode
This commit is contained in:
Artyom Kazak 2019-10-25 22:15:48 +03:00 committed by avele
parent f2aa18b6f7
commit d334d7e355
2 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,7 @@ jobs:
- |
if [ "$TRAVIS_EVENT_TYPE" = "push" ]; then
export BRANCH="$(echo "$TRAVIS_BRANCH" | tr '/' '-')"
make front/travis-docker "tag=$BRANCH--front"
make front/travis-docker "tag=$BRANCH--front" || travis_terminate 1
docker login quay.io -u "$DOCKER_USER" -p "$DOCKER_PASS"
docker push "quay.io/aelve/guide:$BRANCH--front"
fi

View File

@ -59,11 +59,12 @@ back/travis-docker:
docker build docker/back -t quay.io/aelve/guide:$(tag)
rm -rf docker/back/files
# Create a Docker image for the front;
# Create a Docker image for the front
.PHONY: front/travis-docker
front/travis-docker:
rm -rf docker/front/files && mkdir docker/front/files
cp -R front/dist docker/front/files/
cd ./docker/front/files/dist/ && export NODE_ENV=production && npm install
if grep -q "Vue in development mode" docker/front/files/dist/src/main.js; then echo "The frontend has been built in development mode"; exit 1; fi
docker build docker/front -t quay.io/aelve/guide:$(tag)
rm -rf docker/front/files