Skip to content

Commit b76b871

Browse files
MarcinGinsztAllda
authored andcommitted
more documentation about the E2E tests
1 parent 6ae4dcc commit b76b871

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/e2e.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
name: E2E-CI
3+
###
4+
# To read more about the E2E workflow, see docs/ci-cd.md
5+
###
36

47
on: # yamllint disable-line rule:truthy
58
workflow_run:

docs/ci-cd.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,43 @@ The following secrets should be kept in the repository:
1212
| BOT_TOKEN | PAT (Personal Access Token) of rh-operator-bundle-test-e2e | E2E tests- fake "partner" account, allows access to repository operator-pipelines-test |
1313
| KUBECONFIG | Kubeconfig of the cluster, where E2E tests should run | E2E tests- resources are deployed to the namespace $SHORT_COMMIT_HASH in this cluster |
1414
| VAULT_PASSWORD | Password to the Ansible Vault stored in the repository | E2E tests- password is needed to decrypt the secrets and thus- recreate the resources |
15+
16+
## E2E tests
17+
18+
### When they run?
19+
20+
E2E tests are stage of the CI/CD that runs only in two cases:
21+
- On merge to main and before deployment
22+
- On desire (manual action- by clicking "run workflow" via GitHub UI)
23+
24+
There are future plans to run them in cronjob as a part of the QA workflow.
25+
26+
### E2E tests stages?
27+
28+
- prepare the environment- script [ansible/init-custom-env.sh](../ansible/init-custom-env.sh):
29+
- prepare the custom project in OpenShift preprod cluster
30+
- install all of the pipelines dependencies in this project
31+
- run the pipelines with `tkn`
32+
- check if pipelines passed- using `oc`
33+
- remove the project, and thus- clean up all associated resources
34+
35+
To read more about the `init-custom-env`, see [developer-guide.md](developer-guide.md).
36+
37+
### E2E tests dependencies
38+
To run successfully, E2E tests are demanding data from different sources:
39+
1. [GitHub secrets](#Secrets)
40+
2. [Operator-Pipelnes-Test](https://github.com/redhat-openshift-ecosystem/operator-pipelines-test):
41+
3. Since Operator-Pipelines are running against the data in given GitHub repository- well, here it is!
42+
E2E tests are making copy of the branch `e2e-test-operator`, which contains [test operator](https://github.com/redhat-openshift-ecosystem/operator-pipelines-test/tree/e2e-test-operator/operators/test-e2e-operator).
43+
For sake of tests, new version of this operator is created by adding suffix with git commit hash to existing version `0.0.7`.
44+
If this branch will be accidentally removed, it is duplicated in branch `e2e-test-operator-backup`.
45+
4. Data in the Pyxis database:
46+
There are database entities that should exists prior the pipelines are running, which in normal workflow are created by the
47+
partner via Connect.
48+
Cert Project should exist in the environemnt, where E2E tests are running,
49+
with the ID corrensponding to entry in the ci.yaml file
50+
in the test data (see point 2.).
51+
This Cert Project should:
52+
- be accessible to the test partner account (credentials stored in ansbile vault),
53+
- meet the Hydra checklist requirements
54+
- meet the preflight tests requirements.

0 commit comments

Comments
 (0)