Skip to content
Snippets Groups Projects
Unverified Commit 5ab0a53b authored by Andrej Shadura's avatar Andrej Shadura
Browse files

Add a basic integration test


Attempt to boot the freshly built OBS images, verify both backend and
frontend come up.

Signed-off-by: Andrej Shadura's avatarAndrej Shadura <andrew.shadura@collabora.co.uk>
parent 5706e7a8
No related branches found
No related tags found
No related merge requests found
......@@ -63,3 +63,53 @@ worker:
- job: backend
variables:
image: worker
.boot-instance:
image: debian:bookworm-slim
tags:
- heavyweight
services:
- name: docker:stable-dind
alias: docker
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
before_script:
- apt update && apt install -y --no-install-recommends
curl
docker-compose
docker.io
wait-for-it
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
- docker info
- |
cat << EOF > docker-compose.override.yml
version: '2.1'
services:
frontend:
image: $CI_REGISTRY_IMAGE/frontend:$CI_COMMIT_REF_SLUG
ports:
- "80:3000"
backend:
image: $CI_REGISTRY_IMAGE/backend:$CI_COMMIT_REF_SLUG
ports:
- "5252:5252"
worker:
image: $CI_REGISTRY_IMAGE/worker:$CI_COMMIT_REF_SLUG
EOF
- docker-compose up -d
- wait-for-it docker:5252 -s --timeout=180 -- echo "The OBS backend is up"
- wait-for-it docker:80 -s --timeout=180 -- echo "The OBS frontend is up"
after_script:
- docker-compose logs > docker-compose.txt
artifacts:
paths:
- docker-compose.txt
when: always
integration-test:
stage: test
extends: .boot-instance
script:
- curl http://docker:80/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment