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/test-env.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

39 lines
901 B
YAML

---
.test-env-docker-vars:
variables:
IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH}/test-environment
IMAGE_TAG: ${CI_COMMIT_SHORT_SHA}
DOCKERFILE: "test/pleroma_test_env/Dockerfile"
DOCKER_CONTEXT: "test/pleroma_test_env"
BUILD_ARGS: "--build-arg TEST_ENV_PASSWORD=${TEST_ENV_PASSWORD}"
.test-env-test-rules:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
- "test/pleroma_test_env/Dockerfile"
when: always
test:test-env:dockerfile-lint:
extends:
- .dockerfile-lint
- .test-env-docker-vars
- .test-env-test-rules
test:test-env:docker-build:
extends:
- .dockerbuild-test
- .test-env-docker-vars
- .test-env-test-rules
script:
- make image
publish:test-env:docker-image:
extends:
- .docker-publish
- .test-env-docker-vars
script:
- make publish
rules:
- if: '$CI_PIPELINE_SOURCE == "web"'
when: always