-
Notifications
You must be signed in to change notification settings - Fork 30
50 lines (41 loc) · 1.45 KB
/
pki-build-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
name: Testing PKI build
on: workflow_call
env:
NAMESPACE: ${{ vars.REGISTRY_NAMESPACE || 'dogtagpki' }}
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
SHARED: /tmp/workdir/jss
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Retrieve JSS images
uses: actions/cache@v4
with:
key: jss-images-${{ github.sha }}
path: jss-images.tar
- name: Load JSS images
run: docker load --input jss-images.tar
- name: Set up JSS container
run: |
tests/bin/runner-init.sh pki
env:
HOSTNAME: pki.example.com
- name: Import LDAP SDK packages
run: |
docker create --name=ldapjdk-dist quay.io/$NAMESPACE/ldapjdk-dist:latest
docker cp ldapjdk-dist:/root/RPMS/. /tmp/RPMS/
docker rm -f ldapjdk-dist
- name: Install build dependencies
run: |
docker exec pki dnf install -y git rpm-build
docker exec pki git clone -b master https://github.com/$NAMESPACE/pki
docker exec pki dnf builddep -y --skip-unavailable --spec pki/pki.spec
docker cp /tmp/RPMS/. pki:/root/RPMS/
docker exec pki bash -c "dnf localinstall -y /root/RPMS/*"
- name: Build and install PKI
run: |
docker exec pki pki/build.sh --with-timestamp --with-commit-id rpm
docker exec pki bash -c "dnf install -y /root/build/pki/RPMS/*.rpm"