-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
60 lines (55 loc) · 2.23 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
image: docker:20.10.8
#Fix version to prevent passing python version until porting to libxml2
variables:
# When using dind service, we need to instruct docker to talk with
# the daemon started inside of the service. The daemon is available
# with a network connection instead of the default
# /var/run/docker.sock socket. Docker 19.03 does this automatically
# by setting the DOCKER_HOST in
# https://github.com/docker-library/docker/blob/d45051476babc297257df490d22cbd806f1b11e4/19.03/docker-entrypoint.sh#L23-L29
#
# The 'docker' hostname is the alias of the service container as described at
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services.
#
# Specify to Docker where to create the certificates, Docker will
# create them automatically on boot, and will create
# `/certs/client` that will be shared between the service and job
# container, thanks to volume mount from config.toml
DOCKER_TLS_CERTDIR: ""
#DOCKER_DRIVER: aufs
DOCKER_HOST: tcp://docker:2375
#DOCKER_HOST: tcp://dind:2375
services:
- docker:dind
- command:["--registry-mirror", "https://mirror.gcr.io"]
#before_script:
# - docker info
build:
stage: build
tags:
- build
script:
- docker build --rm . -t exist-fdsn-station
- docker run -d -p 80:8080/tcp --name exist-fdsn-station exist-fdsn-station
- sleep 90
# - netstat -ntlp
# - docker port exist-fdsn-station
# - docker ps
# - docker inspect -f '{{.Name}} - {{.NetworkSettings.IPAddress }}' $(docker ps -a)
# - docker network ls
# - ip a
# - docker inspect exist-fdsn-station
- apk add --update py3-pip
- pip3 install pytest==7.1.2
- apk add --no-cache --virtual .build-deps gcc libc-dev libxslt-dev libxml2-dev python3-dev
- apk add --no-cache libxslt
- pip3 install --no-cache-dir lxml==4.6.1
- pip3 install --no-cache-dir xmldiff
- pip3 install --no-cache-dir requests
- apk del .build-deps
# - sleep 5
# - pytest TEST/test.py --host 172.26.0.7
# - pytest TEST/test.py --host tcp://docker:80
- pytest -vv TEST/test.py --host docker:80 -k 'not test_management'
- pytest -vv TEST/test.py --host docker:80 -k 'test_management'
- docker stop exist-fdsn-station