feat(Dind): Test dind containers

This commit is contained in:
Marcel Feix 2022-06-14 18:01:00 +02:00
parent 46e9843a3a
commit 011b57a762
No known key found for this signature in database
GPG Key ID: 04D016E104A25F03
4 changed files with 34 additions and 3 deletions

View File

@ -28,8 +28,18 @@ Test-Docker-compose:
trigger: trigger:
strategy: depend strategy: depend
include: include:
- local: "test/docker-compose/test-docker-compose.gitlab-ci.yml" - local: "test/docker/test-docker-compose.gitlab-ci.yml"
Test-Dind:
stage: verify
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
when: always
- when: manual
trigger:
strategy: depend
include:
- local: "test/docker/test-dind.gitlab-ci.yml"
check_confluence_validity: check_confluence_validity:
extends: .documentation-check-confluence-validity extends: .documentation-check-confluence-validity

View File

@ -0,0 +1,21 @@
stages:
- verify
services:
- name: docker:dind
# explicitly disable tls to avoid docker startup interruption
command: [ "--tls=false" ]
variables:
# Instruct Testcontainers to use the daemon of DinD.
DOCKER_HOST: "tcp://docker:2375"
# Instruct Docker not to start over TLS.
DOCKER_TLS_CERTDIR: ""
# Improve performance with overlayfs.
DOCKER_DRIVER: overlay2
test:
image: docker
stage: verify
script:
- docker run -it alpine echo test

View File

@ -17,8 +17,8 @@ Docker-compose:
extends: .docker-compose-deploy extends: .docker-compose-deploy
variables: variables:
SCP_DESTINATION: "/home/user" SCP_DESTINATION: "/home/user"
SCP_SOURCE: "$CI_PROJECT_DIR/test/docker-compose/docker-compose.yml" SCP_SOURCE: "$CI_PROJECT_DIR/test/docker/docker-compose.yml"
COMPOSE_EXTRA_ARGS: "-f test/docker-compose/docker-compose.yml" COMPOSE_EXTRA_ARGS: "-f test/docker/docker-compose.yml"
SSH_PORT: "22" SSH_PORT: "22"
SSH_URL: "ci-cd.dev.exxcellent.de" SSH_URL: "ci-cd.dev.exxcellent.de"
SSH_USER: "user" SSH_USER: "user"