Dan Anglin
20667709b2
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
29 lines
587 B
YAML
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}
|