Compare commits
5 Commits
test_ci_cd
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6335b425f7 | ||
|
|
c198419f58 | ||
|
|
39ae214f78 | ||
|
|
28d90e66dd | ||
|
|
d1fa4044e1 |
@@ -62,15 +62,14 @@ build_frontend:
|
|||||||
# Build & Push Docker frontend
|
# Build & Push Docker frontend
|
||||||
build_docker_frontend:
|
build_docker_frontend:
|
||||||
stage: package
|
stage: package
|
||||||
image: docker:latest
|
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- shell
|
||||||
dependencies:
|
dependencies:
|
||||||
- check_app_update
|
- check_app_update
|
||||||
- build_frontend
|
- build_frontend
|
||||||
script:
|
script:
|
||||||
|
- apt update
|
||||||
|
- apt install -y docker.io
|
||||||
- source variables.env || true
|
- source variables.env || true
|
||||||
- if [ "$NEW_COMMIT" != "true" ]; then
|
- if [ "$NEW_COMMIT" != "true" ]; then
|
||||||
echo "No new commit, skipping build";
|
echo "No new commit, skipping build";
|
||||||
@@ -80,7 +79,6 @@ build_docker_frontend:
|
|||||||
- docker build -t "$IMAGE_FRONTEND" doodlestudent/front
|
- docker build -t "$IMAGE_FRONTEND" doodlestudent/front
|
||||||
- docker push "$IMAGE_FRONTEND"
|
- docker push "$IMAGE_FRONTEND"
|
||||||
- docker logout
|
- docker logout
|
||||||
|
|
||||||
# Deploy to Production
|
# Deploy to Production
|
||||||
deploy_production:
|
deploy_production:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
@@ -88,6 +86,8 @@ deploy_production:
|
|||||||
dependencies:
|
dependencies:
|
||||||
- build_docker_frontend
|
- build_docker_frontend
|
||||||
- check_app_update
|
- check_app_update
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
before_script:
|
before_script:
|
||||||
- apk add --no-cache openssh-client docker-cli
|
- apk add --no-cache openssh-client docker-cli
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
|
|||||||
Reference in New Issue
Block a user