Skip to content

Commit d7eb383

Browse files
authored
1 parent d140037 commit d7eb383

File tree

3 files changed

+22
-118
lines changed

3 files changed

+22
-118
lines changed

.github/workflows/certsuiterun_validation_test.yaml

Lines changed: 10 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,11 @@ jobs:
1818
- name: Disable default go problem matcher
1919
run: echo "::remove-matcher owner=go::"
2020

21-
# Restart docker using /mnt/docker-storage (sdb) instead of /var/lib/docker (sda).
22-
- name: Make docker to use /mnt (sdb) for storage
23-
run: |
24-
df -h
25-
lsblk
26-
sudo mkdir /mnt/docker-storage
27-
sudo jq '. +={"data-root" : "/mnt/docker-storage"}' < /etc/docker/daemon.json > /tmp/docker-daemon.json
28-
sudo cp /tmp/docker-daemon.json /etc/docker/daemon.json
29-
cat /etc/docker/daemon.json
30-
sudo systemctl restart docker
31-
sudo ls -la /mnt/docker-storage
32-
3321
- name: Check out code into the Go module directory
3422
uses: actions/checkout@v4
3523
with:
3624
ref: ${{ github.sha }}
3725

38-
- name: Build operator
39-
run: ./scripts/ci/build.sh
40-
4126
- name: Removed unused docker images and go cache cleanup
4227
run: |
4328
df -h
@@ -46,51 +31,18 @@ jobs:
4631
go clean -modcache
4732
df -h
4833
49-
# Create a Kind cluster for testing.
50-
- name: Check out `certsuite-sample-workload` repo
51-
uses: actions/checkout@v4
52-
with:
53-
repository: redhat-best-practices-for-k8s/certsuite-sample-workload
54-
path: certsuite-sample-workload
55-
56-
- name: Bootstrap cluster, docker, and python
57-
uses: nick-fields/retry@v3
34+
- name: Setup the k8s cluster
35+
uses: palmsoftware/quick-k8s@v0.0.20
5836
with:
59-
timeout_minutes: 5
60-
max_attempts: 3
61-
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; make bootstrap-cluster && make bootstrap-docker-ubuntu-local && make bootstrap-python-ubuntu-local
37+
disableDefaultCni: true
38+
numControlPlaneNodes: 1
39+
numWorkerNodes: 3
40+
installOLM: true
41+
removeDefaultStorageClass: true
42+
removeControlPlaneTaint: true
6243

63-
# Restart docker using /mnt/docker-storage (sdb) instead of /var/lib/docker (sda).
64-
# This step needs to be done right after the sample workload repo's bootstrap scripts, as they
65-
# overwrite the docker's daemon.json.
66-
- name: Make docker to use /mnt (sdb) for storage
67-
run: |
68-
df -h
69-
lsblk
70-
sudo mkdir /mnt/docker-storage || true
71-
sudo jq '. +={"data-root" : "/mnt/docker-storage"}' < /etc/docker/daemon.json > /tmp/docker-daemon.json
72-
sudo cp /tmp/docker-daemon.json /etc/docker/daemon.json
73-
cat /etc/docker/daemon.json
74-
sudo systemctl restart docker
75-
sudo ls -la /mnt/docker-storage
76-
77-
- name: Run 'make rebuild-cluster'
78-
uses: nick-fields/retry@v3
79-
env:
80-
SKIP_PRELOAD_IMAGES: true
81-
with:
82-
timeout_minutes: 15
83-
max_attempts: 3
84-
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; make rebuild-cluster
85-
86-
- name: Run 'make install'
87-
uses: nick-fields/retry@v3
88-
env:
89-
SKIP_PRELOAD_IMAGES: true
90-
with:
91-
timeout_minutes: 20
92-
max_attempts: 3
93-
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; make install
44+
- name: Build operator
45+
run: ./scripts/ci/build.sh
9446

9547
- name: Install cert-manager to cluster
9648
run: |

.github/workflows/pre-main.yaml

Lines changed: 10 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -92,26 +92,11 @@ jobs:
9292
- name: Disable default go problem matcher
9393
run: echo "::remove-matcher owner=go::"
9494

95-
# Restart docker using /mnt/docker-storage (sdb) instead of /var/lib/docker (sda).
96-
- name: Make docker to use /mnt (sdb) for storage
97-
run: |
98-
df -h
99-
lsblk
100-
sudo mkdir /mnt/docker-storage
101-
sudo jq '. +={"data-root" : "/mnt/docker-storage"}' < /etc/docker/daemon.json > /tmp/docker-daemon.json
102-
sudo cp /tmp/docker-daemon.json /etc/docker/daemon.json
103-
cat /etc/docker/daemon.json
104-
sudo systemctl restart docker
105-
sudo ls -la /mnt/docker-storage
106-
10795
- name: Check out code into the Go module directory
10896
uses: actions/checkout@v4
10997
with:
11098
ref: ${{ github.sha }}
11199

112-
- name: Build operator
113-
run: ./scripts/ci/build.sh
114-
115100
- name: Removed unused docker images and go cache cleanup
116101
run: |
117102
df -h
@@ -120,51 +105,18 @@ jobs:
120105
go clean -modcache
121106
df -h
122107
123-
# Create a Kind cluster for testing.
124-
- name: Check out `certsuite-sample-workload` repo
125-
uses: actions/checkout@v4
108+
- name: Setup the k8s cluster
109+
uses: palmsoftware/quick-k8s@v0.0.20
126110
with:
127-
repository: redhat-best-practices-for-k8s/certsuite-sample-workload
128-
path: certsuite-sample-workload
111+
disableDefaultCni: true
112+
numControlPlaneNodes: 1
113+
numWorkerNodes: 3
114+
installOLM: true
115+
removeDefaultStorageClass: true
116+
removeControlPlaneTaint: true
129117

130-
- name: Bootstrap cluster, docker, and python
131-
uses: nick-fields/retry@v3
132-
with:
133-
timeout_minutes: 5
134-
max_attempts: 3
135-
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; make bootstrap-cluster && make bootstrap-docker-ubuntu-local && make bootstrap-python-ubuntu-local
136-
137-
# Restart docker using /mnt/docker-storage (sdb) instead of /var/lib/docker (sda).
138-
# This step needs to be done right after the sample workload repo's bootstrap scripts, as they
139-
# overwrite the docker's daemon.json.
140-
- name: Make docker to use /mnt (sdb) for storage
141-
run: |
142-
df -h
143-
lsblk
144-
sudo mkdir /mnt/docker-storage || true
145-
sudo jq '. +={"data-root" : "/mnt/docker-storage"}' < /etc/docker/daemon.json > /tmp/docker-daemon.json
146-
sudo cp /tmp/docker-daemon.json /etc/docker/daemon.json
147-
cat /etc/docker/daemon.json
148-
sudo systemctl restart docker
149-
sudo ls -la /mnt/docker-storage
150-
151-
- name: Run 'make rebuild-cluster'
152-
uses: nick-fields/retry@v3
153-
env:
154-
SKIP_PRELOAD_IMAGES: true
155-
with:
156-
timeout_minutes: 15
157-
max_attempts: 3
158-
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; make rebuild-cluster
159-
160-
- name: Run 'make install'
161-
uses: nick-fields/retry@v3
162-
env:
163-
SKIP_PRELOAD_IMAGES: true
164-
with:
165-
timeout_minutes: 20
166-
max_attempts: 3
167-
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; make install
118+
- name: Build operator
119+
run: ./scripts/ci/build.sh
168120

169121
- name: Install cert-manager to cluster
170122
run: |

scripts/ci/smoke_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ echo "$crJson" | jq
6262
export EXPECTED_VERDICT=${EXPECTED_VERDICT:-"pass"}
6363
export EXPECTED_TOTAL_TCS=${EXPECTED_TOTAL_TCS:-"101"}
6464
export EXPECTED_FAILED=${EXPECTED_FAILED:-"0"}
65-
export EXPECTED_PASSED=${EXPECTED_PASSED:-"5"}
66-
export EXPECTED_SKIPPED=${EXPECTED_SKIPPED:-"96"}
65+
export EXPECTED_PASSED=${EXPECTED_PASSED:-"1"}
66+
export EXPECTED_SKIPPED=${EXPECTED_SKIPPED:-"100"}
6767

6868
# Check the verdit is pass
6969
echo "$crJson" | jq 'if .status.report.verdict == env.EXPECTED_VERDICT then "verdict is "+env.EXPECTED_VERDICT else error("verdict mismatch: \(.status.report.verdict), expected "+env.EXPECTED_VERDICT) end'

0 commit comments

Comments
 (0)