-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
46 lines (44 loc) · 1.63 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
variables:
FF_ENABLE_JOB_CLEANUP: "true"
stages:
- build_and_test
build_and_test:
stage: build_and_test
script:
- sudo -E ./fixperms
- sudo -E rm -rf /tmp/cienv.txt
- env > /tmp/cienv.txt
- sudo -E mkdir -p /etc/haproxy
- sudo -E rm -rf /var/www/html/test_file
- systemctl status docker && DOCKERSVC=true
- if [ -z "${DOCKERSVC}" ]; then
- if [ -f /etc/redhat-release ]; then
- sudo -E yum -y makecache
- sudo -E yum -y install docker
- sudo -E service docker restart
- else
- sudo -E apt-get update -y
- DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y docker.io
- fi
- fi
- sudo -E ./install
- sudo -E mkdir -p /etc/haproxy
- sudo -E cp ./ci-haproxy-cfg.txt /etc/haproxy/haproxy.cfg
- sudo -E mkdir -p /etc/ssl/certs/local
- sudo -E cp -a selfsigned.pem /etc/ssl/certs/local/.
- sudo -E ./fixperms
- sudo -E rm -rf /tmp/test_file
- TEST_STRING="TEST FILE CONTENTS commit ${CI_COMMIT_SHA}"
- echo "${TEST_STRING}" > /tmp/test_file
- sudo -E cp -f /tmp/test_file /var/www/html/.
- |
FOUND_STRING="$(sudo -E docker run --add-host=host.docker.internal:host-gateway --rm ymuski/curl-http3 curl -m 5 -s -f -k "https://host.docker.internal/test_file" --http3)"
sudo -E chown -R gitlab-runner: .
echo "PUSHED '${TEST_STRING}'"
echo "PULLED '${FOUND_STRING}'"
sudo -E rm -f /tmp/test_file /var/www/html/test_file
if [ "${TEST_STRING}" != "${FOUND_STRING}" ]; then
echo "Found string does not match expected string!"
echo "Something went wrong!"
exit 1
fi