Rewrite pipeline script
This commit is contained in:
parent
de3a8984d1
commit
9fde33eb50
1 changed files with 3 additions and 11 deletions
|
|
@ -1,19 +1,11 @@
|
||||||
pipeline:
|
pipeline:
|
||||||
build:
|
build_and_deploy:
|
||||||
image: docker:dind
|
image: bash
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
commands:
|
commands:
|
||||||
- docker build -t frontend:${CI_COMMIT_SHA:0:8} .
|
- docker build -t frontend:${CI_COMMIT_SHA:0:8} .
|
||||||
- docker tag frontend:${CI_COMMIT_SHA:0:8} frontend:latest
|
- docker tag frontend:${CI_COMMIT_SHA:0:8} frontend:latest
|
||||||
|
|
||||||
deploy:
|
|
||||||
image: docker:dind
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
commands:
|
|
||||||
- docker stop frontend || true
|
- docker stop frontend || true
|
||||||
- docker rm frontend || true
|
- docker rm frontend || true
|
||||||
- docker run -d --name frontend -p 5137:5137 frontend:latest
|
- docker run -d --name frontend -p 5173:5173 frontend:latest
|
||||||
|
|
||||||
branches: master
|
branches: master
|
||||||
Loading…
Add table
Add a link
Reference in a new issue