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_docker_frontend:
|
||||
stage: package
|
||||
image: docker:latest
|
||||
services:
|
||||
- docker:dind
|
||||
tags:
|
||||
- docker
|
||||
- shell
|
||||
dependencies:
|
||||
- check_app_update
|
||||
- build_frontend
|
||||
script:
|
||||
- apt update
|
||||
- apt install -y docker.io
|
||||
- source variables.env || true
|
||||
- if [ "$NEW_COMMIT" != "true" ]; then
|
||||
echo "No new commit, skipping build";
|
||||
@@ -80,7 +79,6 @@ build_docker_frontend:
|
||||
- docker build -t "$IMAGE_FRONTEND" doodlestudent/front
|
||||
- docker push "$IMAGE_FRONTEND"
|
||||
- docker logout
|
||||
|
||||
# Deploy to Production
|
||||
deploy_production:
|
||||
stage: deploy
|
||||
@@ -88,6 +86,8 @@ deploy_production:
|
||||
dependencies:
|
||||
- build_docker_frontend
|
||||
- check_app_update
|
||||
tags:
|
||||
- docker
|
||||
before_script:
|
||||
- apk add --no-cache openssh-client docker-cli
|
||||
- mkdir -p ~/.ssh
|
||||
|
||||
Reference in New Issue
Block a user