1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00
Files
go-chasquid-smtp/.gitlab-ci.yml
Alberto Bertogli 7814c64cfb gitlab: Upload images to dockerhub
It can be convenient to upload images to dockerhub for redundancy and
visibility, so this patch updates the gitlab CI configuration to do
that.

While at it, rename the stages for readability.
2020-03-23 01:28:46 +00:00

53 lines
1.4 KiB
YAML

stages:
- test
- image
# Integration test, using the module versions from the repository.
stable:
stage: test
image: docker:stable
services:
- docker:dind
script:
- docker info
- docker build -t chasquid-test -f test/Dockerfile .
- docker run chasquid-test env
- docker run chasquid-test make test
# Integration test, using the latest module versions.
latest:
stage: test
image: docker:stable
services:
- docker:dind
script:
- docker info
- docker build -t chasquid-test --build-arg GO_GET_ARGS="-u=patch" -f test/Dockerfile .
- docker run chasquid-test env
- docker run chasquid-test make test
# Build docker image, upload to gitlab registry.
build_gitlab:
stage: image
image: docker:stable
services:
- docker:dind
script:
- docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME -f docker/Dockerfile .
- docker push $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME
# Build docker image, upload to dockerhub registry.
build_dockerhub:
stage: image
image: docker:stable
services:
- docker:dind
script:
- docker info
- docker login -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD docker.io
- docker build -t index.docker.io/albertito/chasquid:$CI_BUILD_REF_NAME -f docker/Dockerfile .
- docker push index.docker.io/albertito/chasquid:$CI_BUILD_REF_NAME