mirror of
https://github.com/aelve/guide.git
synced 2024-12-22 20:31: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:
parent
f2aa18b6f7
commit
d334d7e355
@ -34,7 +34,7 @@ jobs:
|
|||||||
- |
|
- |
|
||||||
if [ "$TRAVIS_EVENT_TYPE" = "push" ]; then
|
if [ "$TRAVIS_EVENT_TYPE" = "push" ]; then
|
||||||
export BRANCH="$(echo "$TRAVIS_BRANCH" | tr '/' '-')"
|
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 login quay.io -u "$DOCKER_USER" -p "$DOCKER_PASS"
|
||||||
docker push "quay.io/aelve/guide:$BRANCH--front"
|
docker push "quay.io/aelve/guide:$BRANCH--front"
|
||||||
fi
|
fi
|
||||||
|
3
Makefile
3
Makefile
@ -59,11 +59,12 @@ back/travis-docker:
|
|||||||
docker build docker/back -t quay.io/aelve/guide:$(tag)
|
docker build docker/back -t quay.io/aelve/guide:$(tag)
|
||||||
rm -rf docker/back/files
|
rm -rf docker/back/files
|
||||||
|
|
||||||
# Create a Docker image for the front;
|
# Create a Docker image for the front
|
||||||
.PHONY: front/travis-docker
|
.PHONY: front/travis-docker
|
||||||
front/travis-docker:
|
front/travis-docker:
|
||||||
rm -rf docker/front/files && mkdir docker/front/files
|
rm -rf docker/front/files && mkdir docker/front/files
|
||||||
cp -R front/dist docker/front/files/
|
cp -R front/dist docker/front/files/
|
||||||
cd ./docker/front/files/dist/ && export NODE_ENV=production && npm install
|
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)
|
docker build docker/front -t quay.io/aelve/guide:$(tag)
|
||||||
rm -rf docker/front/files
|
rm -rf docker/front/files
|
||||||
|
Loading…
Reference in New Issue
Block a user