-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
774d4f7
commit 96cb7ff
Showing
5 changed files
with
673 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: setup-partner-cluster | ||
description: 'Setup a partner cluster for testing.' | ||
|
||
inputs: | ||
make-command: | ||
description: 'The make command to run.' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Check out `certsuite-sample-workload` | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
repository: redhat-best-practices-for-k8s/certsuite-sample-workload | ||
path: certsuite-sample-workload | ||
|
||
- name: Check if /etc/docker/daemon.json exists and if not, create it. | ||
shell: bash | ||
run: | | ||
if [ ! -f /etc/docker/daemon.json ]; then | ||
echo '{}' | sudo tee /etc/docker/daemon.json | ||
fi | ||
- name: Bootstrap cluster and docker | ||
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | ||
with: | ||
timeout_minutes: 90 | ||
max_attempts: 3 | ||
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; make bootstrap-cluster; make bootstrap-docker-ubuntu-local | ||
|
||
- name: Mount docker volume to /mnt/sdb | ||
shell: bash | ||
run: | | ||
df -h | ||
lsblk | ||
if [ ! -d /mnt/docker-storage ]; then | ||
sudo mkdir /mnt/docker-storage | ||
fi | ||
sudo jq '. +={"data-root" : "/mnt/docker-storage"}' < /etc/docker/daemon.json > /tmp/docker-daemon.json | ||
sudo cp /tmp/docker-daemon.json /etc/docker/daemon.json | ||
cat /etc/docker/daemon.json | ||
sudo systemctl restart docker | ||
sudo ls -la /mnt/docker-storage | ||
- name: Run 'make rebuild-cluster' | ||
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | ||
with: | ||
timeout_minutes: 90 | ||
max_attempts: 3 | ||
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; make rebuild-cluster | ||
|
||
- name: Run 'make ${{inputs.make-command}}' | ||
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0 | ||
with: | ||
timeout_minutes: 90 | ||
max_attempts: 3 | ||
command: cd ${GITHUB_WORKSPACE}/certsuite-sample-workload; python3 -m venv .venv; source .venv/bin/activate; pip install --upgrade pip; pip install jinjanator; cp .venv/bin/jinjanate .venv/bin/j2; make ${{ inputs.make-command }} | ||
|
||
- name: Show pods | ||
shell: bash | ||
run: oc get pods -A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Integration Testing | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
integration: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
SHELL: /bin/bash | ||
SKIP_PRELOAD_IMAGES: true | ||
KUBECONFIG: '/home/runner/.kube/config' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23.2 | ||
|
||
- name: Setup partner cluster | ||
uses: ./.github/actions/setup-partner-cluster | ||
with: | ||
make-command: 'install-for-qe' | ||
|
||
- name: Run integration tests | ||
run: make integration-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.