22 lines
769 B
YAML
22 lines
769 B
YAML
stages:
|
|
- build
|
|
- test
|
|
- deploy
|
|
|
|
services:
|
|
- docker:stable-dind
|
|
|
|
docker-build:
|
|
image: docker:stable
|
|
stage: build
|
|
script:
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
|
|
- docker pull registry.gitlab.com/confreriedukassoulait/twitchbot:latest || true
|
|
- docker build --cache-from registry.gitlab.com/confreriedukassoulait/twitchbot:latest -t twitchbot .
|
|
|
|
- docker tag twitchbot:latest registry.gitlab.com/confreriedukassoulait/twitchbot:${CI_COMMIT_SHORT_SHA}
|
|
- docker tag twitchbot:latest registry.gitlab.com/confreriedukassoulait/twitchbot:latest
|
|
|
|
- docker push registry.gitlab.com/confreriedukassoulait/twitchbot:${CI_COMMIT_SHORT_SHA}
|
|
- docker push registry.gitlab.com/confreriedukassoulait/twitchbot:latest
|