postal/.gitlab-ci.yml
2020-04-13 00:37:36 -04:00

40 lines
889 B
YAML

#variables:
before_script:
- docker info
stages:
- docker-build
- tests
- cleanup
build-docker-alpine:
stage: docker-build
script:
- cd alpine
- docker build --network=host -t catdeployed/postal:alpine .
- docker save -o postal-alpine-container.tar catdeployed/postal:alpine
artifacts:
paths:
- postal-alpine-container.tar
build-docker-ubuntu:
stage: docker-build
script:
- cd ubuntu
- docker build --network=host -t catdeployed/postal:ubuntu .
- docker save -o postal-ubuntu-container.tar catdeployed/postal:ubuntu
artifacts:
paths:
- ubuntu/postal-ubuntu-container.tar
test-docker-ubuntu:
stage: tests
script:
- docker load -i ubuntu/postal-ubuntu-container.tar
- docker run -i catdeployed/postal:ubuntu /opt/postal/bin/postal make-user
docker-cleanup:
stage: cleanup
script:
- docker system prune -af