Skip to content

Commit 33f4fe8

Browse files
Copilotcommjoen
andcommitted
Add documentation for preview deployment workflow
Co-authored-by: commjoen <[email protected]>
1 parent 26e5a0f commit 33f4fe8

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

CONTRIBUTING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,37 @@ Pull requests should be as small/atomic as possible. Large, wide-sweeping change
4646

4747
For example: `Fix #545` or `Closes #10`
4848

49+
### Testing your changes with Preview Deployments
50+
51+
When you create a pull request, GitHub Actions will automatically build and publish preview Docker containers to GitHub Container Registry. This allows you and reviewers to easily test your changes before merging.
52+
53+
#### How Preview Deployments Work
54+
55+
1. **Automatic Build**: When you open a PR, the preview workflow builds both `wrongsecrets-balancer` and `cleaner` containers
56+
2. **Container Publishing**: Images are pushed to `ghcr.io` with PR-specific tags (e.g., `pr-123`)
57+
3. **Deployment Instructions**: A comment is automatically posted on your PR with detailed deployment instructions
58+
4. **Easy Testing**: Anyone can deploy and test your changes using the provided Helm commands
59+
60+
#### Using Preview Deployments
61+
62+
After opening a PR, look for the automated comment that provides:
63+
64+
- **Direct deployment commands** using Helm
65+
- **Custom values file** for advanced configuration
66+
- **Container registry links** to inspect the built images
67+
- **Local testing instructions** for different deployment scenarios
68+
69+
Example deployment command from the preview comment:
70+
```bash
71+
helm install my-preview wrongsecrets/wrongsecrets-ctf-party \
72+
--set balancer.repository=ghcr.io/owasp/wrongsecrets-balancer \
73+
--set balancer.tag=pr-123 \
74+
--set wrongsecretsCleanup.repository=ghcr.io/owasp/cleaner \
75+
--set wrongsecretsCleanup.tag=pr-123
76+
```
77+
78+
This makes it easy for maintainers and other contributors to test your changes in a real Kubernetes environment.
79+
4980
## How to set up your Contributor Environment
5081

5182
1. Create a GitHub account. Multiple different GitHub subscription plans are available, but you only need a free one. Follow [these steps](https://help.github.com/en/articles/signing-up-for-a-new-github-account "Signing up for a new GitHub account") to set up your account.

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ A 100 contestant game can be played on the AWS, GCP, and Azure setup, which will
6868

6969
This is an experimental release. It showed to work at 6 CTFs already, we just did not complete the documentation and the cleaning up of the Helm chart yet. However: it is working in its basis, and can support a good crowd. Currently, we support using Minikube, AWS EKS, GCP GKE, and Azure AKS (_**Please follow the readme in the folder for each cloud provider if you want to use it, as the guides section is not updated yet**_).
7070

71+
**For Contributors**: Pull requests automatically generate preview deployments with containers published to GitHub Container Registry. See the automated PR comments for deployment instructions.
72+
7173
## How to use it
7274

7375
The different setups are explained in [OWASP WrongSecrets CTF-instructions](https://github.com/OWASP/wrongsecrets/blob/master/ctf-instructions.md). With the 3-domain approach you generate flags for CTFD automatically, while with the 2-domain setup you need to set it up manually.

0 commit comments

Comments
 (0)