This repository has been archived on 2023-05-06. You can view files and clone it, but cannot push or open issues or pull requests.
pleroma-ansible-playbook/.gitlab/ci/templates/docker.gitlab-ci.yml
Dan Anglin 20667709b2
ci: test environment docker image for CI pipelines
This commit includes a Dockerfile for building a test environment for
future CI pipelines. This commit also refactors the GitLab CI pipeline
files by splitting the jobs into different files:

- .gitlab-ci.yml: Global CI pipeline file.
- .gitlab/ci/test-env.gitlab-ci.yml: Jobs to test and publish the
docker image for the test environment.
- .gitlab/ci/playbook.gitlab-ci.yml: Jobs to test and publish the
docker image for the pleroma playbook
- .gitlab/ci/templates/docker.gitlab-ci.yml: Template jobs for
testing and publishing docker images.

Part of dananglin/pleroma-ansible-playbook#17
2020-07-10 07:22:39 +01:00

29 lines
587 B
YAML

---
.install-make: &install-make
- apk add --no-cache make
.docker-build-setup:
image: docker:19.03.8
services:
- docker:19.03.8-dind
.dockerfile-lint:
stage: test
image: hadolint/hadolint:v1.18.0-alpine
script:
- hadolint ${DOCKERFILE}
.dockerbuild-test:
stage: test
extends: .docker-build-setup
before_script:
- *install-make
.docker-publish:
stage: publish
extends: .docker-build-setup
before_script:
- *install-make
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
after_script:
- docker logout ${CI_REGISTRY}