Skip to content

Commit 784452a

Browse files
committed
Document how to create encrypted secret for OpenShift tests
1 parent e960d56 commit 784452a

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

docs/deployment/secrets.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,46 @@ In both cases you have to do some tweaks before using them:
130130
- `id_ed25519[.pub]`: replace with your ssh keys
131131

132132
Not all services use all of them. For example `copr` is needed only by `packit` service.
133+
134+
## Encrypting Secrets for OpenShift Tests in Testing Farm
135+
136+
### Prerequisites
137+
138+
To run OpenShift tests triggered by Packit successfully, you need to encrypt the CRC Pull Secret **against your fork**.
139+
140+
> **Important:** The encryption has a 448 character limit per secret. If your pull secret exceeds this limit, split it into multiple smaller chunks.
141+
142+
### Obtaining Required Information
143+
144+
1. **CRC Pull Secret**: Access the pull secret from "Bitwarden → RH Portal account for Image Builder and OpenShift Local → Red Hat OpenShift Local Pull Secret"
145+
146+
2. **Token ID**: Use the public Packit testing farm token for the Public Ranch:
147+
`0cfc00a8-94d7-4408-babc-4d0bc43821ea`
148+
149+
### Encryption Process
150+
151+
For each part of your split secret, follow these steps:
152+
153+
1. Encrypt the secret part using the testing-farm CLI tool:
154+
155+
```bash
156+
testing-farm encrypt --token-id 0cfc00a8-94d7-4408-babc-4d0bc43821ea --git-url https://github.com/YOUR_USERNAME/deployment <crc_pull_secret_part>
157+
```
158+
159+
2. Add the encrypted output to the corresponding `CRC_PULL_SECRET_PART_X` list in the `.testing-farm.yaml` file in your repository.
160+
161+
### Example Configuration Structure
162+
163+
Your `.testing-farm.yaml` file should contain entries similar to:
164+
165+
```yaml
166+
version: 1
167+
environments:
168+
secrets:
169+
CRC_PULL_SECRET_PART_1:
170+
- "0cfc00a8-94d7-4408-babc-4d0bc43821ea,encrypted_string_here"
171+
CRC_PULL_SECRET_PART_2:
172+
- "0cfc00a8-94d7-4408-babc-4d0bc43821ea,another_encrypted_string_here"
173+
```
174+
175+
Make sure to replace `YOUR_USERNAME` with your actual GitHub username in the git URL.

0 commit comments

Comments
 (0)