Skip to content

Commit a2a919b

Browse files
eco_gotests: build container image
1 parent ce77f64 commit a2a919b

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

.github/workflows/pr.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1414

1515
- name: Install dependent PRs if needed
16-
uses: depends-on/depends-on-action@61cb3f4a0e2c8ae4b90c9448dc57c7ba9ca24c35 # main
16+
uses: depends-on/depends-on-action@fix-rebase # main
1717
with:
1818
token: ${{ secrets.GITHUB_TOKEN }}
1919

@@ -100,7 +100,7 @@ jobs:
100100
path: ${{ matrix.ansible }}/ansible_collections/redhatci/ocp
101101

102102
- name: Install dependent PRs if needed
103-
uses: depends-on/depends-on-action@61cb3f4a0e2c8ae4b90c9448dc57c7ba9ca24c35 # main
103+
uses: depends-on/depends-on-action@fix-rebase # main
104104
with:
105105
token: ${{ secrets.GITHUB_TOKEN }}
106106
path: ${{ matrix.ansible }}/ansible_collections/redhatci/ocp
@@ -130,7 +130,7 @@ jobs:
130130
steps:
131131

132132
- name: Check all dependent Pull Requests are merged
133-
uses: depends-on/depends-on-action@61cb3f4a0e2c8ae4b90c9448dc57c7ba9ca24c35 # main
133+
uses: depends-on/depends-on-action@fix-rebase # main
134134
with:
135135
token: ${{ secrets.GITHUB_TOKEN }}
136136
check-unmerged-pr: true
@@ -143,7 +143,7 @@ jobs:
143143
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
144144

145145
- name: Install dependent PRs if needed
146-
uses: depends-on/depends-on-action@61cb3f4a0e2c8ae4b90c9448dc57c7ba9ca24c35 # main
146+
uses: depends-on/depends-on-action@fix-rebase # main
147147
with:
148148
token: ${{ secrets.GITHUB_TOKEN }}
149149

roles/eco_gotests/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# eco_gotests
22

3-
This role runs eco-gotests for OpenShift CNF (Cloud Native Functions) testing, specifically for PTP (Precision Time Protocol) and SRIOV (Single Root I/O Virtualization) test suites.
3+
This role runs [eco-gotests](https://github.com/rh-ecosystem-edge/eco-gotests) for OpenShift CNF (Cloud Native Functions) testing, specifically for PTP (Precision Time Protocol) and SRIOV (Single Root I/O Virtualization) test suites.
44

55
## Requirements
66

@@ -9,7 +9,8 @@ This role runs eco-gotests for OpenShift CNF (Cloud Native Functions) testing, s
99
- Valid kubeconfig for the OpenShift cluster
1010

1111
### PTP requirements
12-
- ptp-operator have to be installed
12+
13+
- The ptp-operator has to be installed
1314
- Need apiVersion set to 2 on PtpOperatorConfig
1415

1516
## Role Variables
@@ -25,6 +26,7 @@ This role runs eco-gotests for OpenShift CNF (Cloud Native Functions) testing, s
2526

2627
#### General Configuration
2728
- `eco_gotests_image` (default: `"quay.io/ocp-edge-qe/eco-gotests:latest"`): Container image for eco-gotests
29+
- `eco_gotests_path` (default: undefined): path where to find the source code to build the container. If this is specified, the `eco_gotests_image` is ignored.
2830

2931
#### SRIOV Test Configuration
3032
- `eco_gotests_sriov_labels` (default: `"sriov-hw-enabled"`): Test labels for SRIOV tests
@@ -39,7 +41,6 @@ This role runs eco-gotests for OpenShift CNF (Cloud Native Functions) testing, s
3941
- `eco_gotests_test_verbose` (default: `true`): Enable verbose test output
4042
- `eco_gotests_dump_failed_tests` (default: `true`): Dump failed test information
4143

42-
4344
## Example Playbook
4445

4546
```yaml

roles/eco_gotests/tasks/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
3+
- name: "Build the eco-gotests image"
4+
ansible.builtin.command:
5+
cmd: "make build-docker-image"
6+
chdir: "{{ eco_gotests_path }}"
7+
8+
- name: "Overwrite image name"
9+
ansible.builtin.set_fact:
10+
eco_gotests_image: "eco-gotests:latest"
11+
12+
...

roles/eco_gotests/tasks/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
mode: '0755'
1111
loop: "{{ eco_gotests_test_suites | list }}"
1212

13+
- name: "Build container image"
14+
ansible.builtin.include_tasks: build.yml
15+
when:
16+
- 'eco_gotests_path is defined'
17+
1318
- name: "Eco_gotests : Run PTP tests"
1419
ansible.builtin.include_tasks: ptp.yml
1520
when:

0 commit comments

Comments
 (0)