-
Notifications
You must be signed in to change notification settings - Fork 139
88 lines (71 loc) · 2.19 KB
/
server-basic-test.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Basic server
on: workflow_call
env:
DB_IMAGE: ${{ vars.DB_IMAGE || 'quay.io/389ds/dirsrv' }}
jobs:
# docs/installation/server/Installing_Basic_PKI_Server.md
test:
name: Test
runs-on: ubuntu-latest
env:
SHARED: /tmp/workdir/pki
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Retrieve PKI images
uses: actions/cache@v3
with:
key: pki-images-${{ github.sha }}
path: pki-images.tar
- name: Load PKI images
run: docker load --input pki-images.tar
- name: Create network
run: docker network create example
- name: Set up server container
run: |
tests/bin/runner-init.sh pki
env:
HOSTNAME: pki.example.com
- name: Connect server container to network
run: docker network connect example pki --alias pki.example.com
- name: Create PKI server
run: |
docker exec pki pki-server create -v
- name: Start PKI server
run: |
docker exec pki pki-server start
- name: Set up client container
run: |
tests/bin/runner-init.sh client
env:
HOSTNAME: client.example.com
- name: Connect client container to network
run: docker network connect example client --alias client.example.com
- name: Wait for PKI server to start
run: |
docker exec client curl \
--retry 60 \
--retry-delay 0 \
--retry-connrefused \
-s \
-k \
-o /dev/null \
http://pki.example.com:8080
- name: Stop PKI server
run: |
docker exec pki pki-server stop --wait -v
- name: Remove PKI server
run: |
docker exec pki pki-server remove -v
- name: Gather artifacts from server container
if: always()
run: |
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true
- name: Upload artifacts from server container
if: always()
uses: actions/upload-artifact@v3
with:
name: server-basic-test
path: |
/tmp/artifacts/pki