2021-07-27 22:51:52 +02:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
services:
|
|
|
|
- docker:stable-dind
|
|
|
|
|
|
|
|
docker-build:
|
|
|
|
image: docker:stable
|
2021-07-27 22:41:23 +02:00
|
|
|
stage: build
|
2021-07-27 22:24:30 +02:00
|
|
|
script:
|
2021-07-27 23:09:23 +02:00
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
|
|
|
2021-07-27 23:04:07 +02:00
|
|
|
- docker pull registry.gitlab.com/confreriedukassoulait/twitchbot:latest || true
|
|
|
|
- docker build --cache-from registry.gitlab.com/confreriedukassoulait/twitchbot:latest -t twitchbot .
|
2021-07-27 22:59:04 +02:00
|
|
|
|
2021-07-27 23:05:47 +02:00
|
|
|
- docker tag twitchbot:latest registry.gitlab.com/confreriedukassoulait/twitchbot:${CI_COMMIT_SHORT_SHA}
|
|
|
|
- docker tag twitchbot:latest registry.gitlab.com/confreriedukassoulait/twitchbot:latest
|
2021-07-27 22:59:04 +02:00
|
|
|
|
2021-07-27 23:04:07 +02:00
|
|
|
- docker push registry.gitlab.com/confreriedukassoulait/twitchbot:${CI_COMMIT_SHORT_SHA}
|
|
|
|
- docker push registry.gitlab.com/confreriedukassoulait/twitchbot:latest
|