-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.standalone.yml
25 lines (25 loc) · 1.05 KB
/
.gitlab-ci.standalone.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
test:
variables:
DOMAIN: schema.test.com
CONTAINER_PODMAN: quay.io/podman/stable:latest
WEBSERVER_IMAGE: registry.redhat.io/rhel8/httpd-24
image: $CONTAINER_PODMAN
stage: test
needs:
- job: "build:container"
artifacts: false
script:
- |
yum install -y openssl
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
for file in $(find ./ -maxdepth 3 -regextype posix-extended -iregex '.*[.]json' | sort -g); do
sed -i "s/schema.example.com/${DOMAIN}/" $file
echo "Modified: $file"
done
podman build -build-arg "WEBSERVER_IMAGE=${WEBSERVER_IMAGE}" -t schema .
podman run -d --name schema -e "DOMAIN=${DOMAIN}" -p 443:8443 -p 80:8080 schema
curl --head -X GET --retry 10 --retry-connrefused --retry-delay 2 --fail http://${DOMAIN}:80
openssl s_client -showcerts -connect localhost:443 </dev/null 2>/dev/null|openssl x509 -outform PEM > /etc/pki/ca-trust/source/anchors/server.crt
update-ca-trust
# echo "127.0.0.1 ${DOMAIN}" >> /etc/hosts
helm lint schema-test/