Skip to content

Commit d57fc4d

Browse files
fmudrychmeliik
authored andcommitted
merge workflow documentation in SHARED-CI.md
Signed-off-by: Filip Mudry <[email protected]>
1 parent bc048dc commit d57fc4d

File tree

2 files changed

+18
-38
lines changed

2 files changed

+18
-38
lines changed

SHARED-CI.md

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,18 @@ run the script to automatically update `renovate.json`.
198198
This ensures your Shared CI workflows follow the GitHub Actions versions defined
199199
in the upstream reposistory and avoids unnecessary merge conflicts.
200200

201-
### Task Integration Tests
201+
### Task Validation and Integration Tests
202202

203203
- workflow: [`.github/workflows/run-task-tests.yaml`](.github/workflows/run-task-tests.yaml)
204-
- script: [`.github/scripts/test_tekton_tasks.sh`](.github/scripts/test_tekton_tasks.sh)
204+
- tests script: [`.github/scripts/test_tekton_tasks.sh`](.github/scripts/test_tekton_tasks.sh)
205+
- validation script: [`.github/scripts/check_tekton_tasks.sh`](.github/scripts/check_tekton_tasks.sh)
205206

206-
This workflow automatically runs integration tests for any Tekton Task that is changed in a pull request. It spins up a temporary Kubernetes (Kind) cluster, deploys Tekton, and then executes the tests defined for the modified task.
207+
To ensure all Tekton Tasks are well-formed and valid, a single `Run Task Tests` workflow is executed on every pull request that modifies files in the `task/` directory.
208+
209+
This workflow is designed to be efficient by following a two-stage logic:
210+
211+
1. `Syntax Validation`
212+
2. `Integration Tests`
207213

208214
#### How to Add a Test
209215

@@ -288,22 +294,6 @@ Using `$(params.*)` directly in a script creates a security flaw. Tekton perform
288294

289295
For more details and guidance on fixing the issue, see the [Tekton recommendations](https://github.com/tektoncd/catalog/blob/main/recommendations.md#dont-use-interpolation-in-scripts-or-string-arguments)
290296

291-
### Tekton Task Validation
292-
293-
To ensure all Tekton Tasks are well-formed and valid, a `Check Tekton Tasks` workflow is executed on every pull request. This workflow serves as a safeguard to block invalid tasks from being merged, so we don’t risk breaking users.
294-
295-
#### If the Check Fails
296-
297-
- Open the workflow logs in GitHub Actions
298-
- Look at the `Apply all Tasks` step
299-
- The logs will show which Task file failed and the exact error
300-
301-
> [!NOTE]
302-
> The `setup-tektoncd` step may occasionally fail due to GitHub API `rate limits` (see [tektoncd/actions#9](https://github.com/tektoncd/actions/issues/9)).
303-
> This is a known issue and not related to your changes.
304-
>
305-
> The current workaround is to `re-run the workflow`.
306-
307297

308298
[task-repo-shared-ci]: https://github.com/konflux-ci/task-repo-shared-ci
309299
[onboarding process]: https://github.com/konflux-ci/task-repo-shared-ci?tab=readme-ov-file#-onboarding

{{cookiecutter.repo_root}}/SHARED-CI.md

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,18 @@ run the script to automatically update `renovate.json`.
198198
This ensures your Shared CI workflows follow the GitHub Actions versions defined
199199
in the upstream reposistory and avoids unnecessary merge conflicts.
200200

201-
### Task Integration Tests
201+
### Task Validation and Integration Tests
202202

203203
- workflow: [`.github/workflows/run-task-tests.yaml`](.github/workflows/run-task-tests.yaml)
204-
- script: [`.github/scripts/test_tekton_tasks.sh`](.github/scripts/test_tekton_tasks.sh)
204+
- tests script: [`.github/scripts/test_tekton_tasks.sh`](.github/scripts/test_tekton_tasks.sh)
205+
- validation script: [`.github/scripts/check_tekton_tasks.sh`](.github/scripts/check_tekton_tasks.sh)
205206

206-
This workflow automatically runs integration tests for any Tekton Task that is changed in a pull request. It spins up a temporary Kubernetes (Kind) cluster, deploys Tekton, and then executes the tests defined for the modified task.
207+
To ensure all Tekton Tasks are well-formed and valid, a single `Run Task Tests` workflow is executed on every pull request that modifies files in the `task/` directory.
208+
209+
This workflow is designed to be efficient by following a two-stage logic:
210+
211+
1. `Syntax Validation`
212+
2. `Integration Tests`
207213

208214
#### How to Add a Test
209215

@@ -288,22 +294,6 @@ Using `$(params.*)` directly in a script creates a security flaw. Tekton perform
288294

289295
For more details and guidance on fixing the issue, see the [Tekton recommendations](https://github.com/tektoncd/catalog/blob/main/recommendations.md#dont-use-interpolation-in-scripts-or-string-arguments)
290296

291-
### Tekton Task Validation
292-
293-
To ensure all Tekton Tasks are well-formed and valid, a `Check Tekton Tasks` workflow is executed on every pull request. This workflow serves as a safeguard to block invalid tasks from being merged, so we don’t risk breaking users.
294-
295-
#### If the Check Fails
296-
297-
- Open the workflow logs in GitHub Actions
298-
- Look at the `Apply all Tasks` step
299-
- The logs will show which Task file failed and the exact error
300-
301-
> [!NOTE]
302-
> The `setup-tektoncd` step may occasionally fail due to GitHub API `rate limits` (see [tektoncd/actions#9](https://github.com/tektoncd/actions/issues/9)).
303-
> This is a known issue and not related to your changes.
304-
>
305-
> The current workaround is to `re-run the workflow`.
306-
307297

308298
[task-repo-shared-ci]: https://github.com/konflux-ci/task-repo-shared-ci
309299
[onboarding process]: https://github.com/konflux-ci/task-repo-shared-ci?tab=readme-ov-file#-onboarding

0 commit comments

Comments
 (0)