-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add encrypted CRC_PULL_SECRET #648
Add encrypted CRC_PULL_SECRET #648
Conversation
Build succeeded. ✔️ pre-commit SUCCESS in 1m 25s |
0abb1c6
to
6b95f96
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 28s |
6b95f96
to
7d0aff7
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 22s |
7d0aff7
to
c7467d1
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 26s |
c7467d1
to
40ee5f3
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 22s |
Build succeeded. ✔️ pre-commit SUCCESS in 1m 24s |
400934a
to
2eb1e75
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 24s |
2eb1e75
to
fd1b5cf
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 23s |
fd1b5cf
to
0349c77
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 26s |
0349c77
to
bd7a86e
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 23s |
84e22e3
to
cb40675
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 24s |
cb40675
to
d47e43b
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 23s |
d47e43b
to
afa686c
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 21s |
afa686c
to
861cb75
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 26s |
861cb75
to
83532f6
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 23s |
83532f6
to
6a8a424
Compare
638a056
to
e960d56
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 29s |
Build succeeded. ✔️ pre-commit SUCCESS in 1m 31s |
784452a
to
67a55c3
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 23s |
67a55c3
to
7f081d0
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 23s |
7f081d0
to
f159fc7
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 43s |
f159fc7
to
53efadb
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 21s |
Build succeeded. ✔️ pre-commit SUCCESS in 1m 22s |
01e3426
to
065af09
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 24s |
065af09
to
c2a2a8b
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 24s |
c2a2a8b
to
ebd8a85
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 33s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
@@ -130,3 +130,47 @@ In both cases you have to do some tweaks before using them: | |||
- `id_ed25519[.pub]`: replace with your ssh keys | |||
|
|||
Not all services use all of them. For example `copr` is needed only by `packit` service. | |||
|
|||
## Encrypting Secrets for OpenShift Tests in Testing Farm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is needed only for running from forks, I would mention it explicitly in the title, and also add a note in the beginning that if you have the access and create branches in the repo itself, this process is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't run the test from a fork, someone still has to go through this procedure and encrypt the CRC pull secret against the main packit repo. So I think the title is ok. I should probably make it clearer in the description below. I will try to rephrase it.
- name: Look for pull_secret (splitted in small parts due to testing farm encryption) | ||
ansible.builtin.set_fact: | ||
pull_secret_part_1: "{{ lookup('env', 'CRC_PULL_SECRET_PART_1') }}" | ||
pull_secret_part_2: "{{ lookup('env', 'CRC_PULL_SECRET_PART_2') }}" | ||
pull_secret_part_3: "{{ lookup('env', 'CRC_PULL_SECRET_PART_3') }}" | ||
pull_secret_part_4: "{{ lookup('env', 'CRC_PULL_SECRET_PART_4') }}" | ||
pull_secret_part_5: "{{ lookup('env', 'CRC_PULL_SECRET_PART_5') }}" | ||
pull_secret_part_6: "{{ lookup('env', 'CRC_PULL_SECRET_PART_6') }}" | ||
pull_secret_part_7: "{{ lookup('env', 'CRC_PULL_SECRET_PART_7') }}" | ||
when: pull_secret == "" | ||
|
||
- name: Rebuild pull_secret from its parts | ||
ansible.builtin.set_fact: | ||
pull_secret: "{{ pull_secret_part_1 }}{{ pull_secret_part_2 }}{{ pull_secret_part_3 }}{{ pull_secret_part_4 }}{{ pull_secret_part_5 }}{{ pull_secret_part_6 }}{{ pull_secret_part_7 }}" | ||
when: pull_secret == "" and pull_secret_part_1 != "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this be simplified using a list, like pull_secret_parts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I follow, you mean simplify with a loop? I am not sure I can dynamically create variable names in ansible. I would not know hot to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you mean, instead, recreate the secret outside of ansible, it can be done, but since I have some checks here I preferred to do it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant the first way. But I don't know the details on how to do this with ansible, so I am ok with leaving as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I have an idea for this…
Build succeeded. ✔️ pre-commit SUCCESS in 1m 30s |
c7d5777
to
f5f03bd
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 29s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
Fixes #564