Skip to content
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

tests-scan: Add "image-download" secret #6062

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/test_tests_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def test_amqp_pr(self, mock_queue, _mock_strftime):
"slug": f"pull-{self.pull_number}-abcdef-20240102-030405-fedora-nightly",
"target": "stable-1.0",
"container": "supertasks",
"secrets": ["github-token"],
"secrets": ["github-token", "image-download"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this JSON schema defined anywhere? Half of it looks like a Github event and the other part of the job looks like something Cockpit test specific?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the secret is image-download? I found that a bit confusing as image-download is also something I often use :) So I almost wonders if secrets was tied to an invocation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That secret is defined in cockpit-project/cockpituous#594 . I named it that so that it matches the already existing "image-upload" secret. I.e. We declare set of abstract secret names, assign them in the generated tasks ("image-upload", "image-download", "github-token"), and define their "implementation" in the job config.

"env": {
"BASE_BRANCH": "stable-1.0",
"COCKPIT_BOTS_REF": "main",
Expand Down Expand Up @@ -338,7 +338,7 @@ def test_amqp_sha_nightly(self, mock_queue, _mock_strftime):
},
# project/repo doesn't have a custom container name file
"container": None,
"secrets": ["github-token"],
"secrets": ["github-token", "image-download"],
"env": {
"COCKPIT_BOTS_REF": "main",
"TEST_OS": "fedora",
Expand Down Expand Up @@ -389,7 +389,7 @@ def test_amqp_sha_pr(self, mock_queue, _mock_strftime):
"slug": f"pull-{self.pull_number}-abcdef-20240102-030405-fedora-nightly",
"target": "stable-1.0",
"container": "supertasks",
"secrets": ["github-token"],
"secrets": ["github-token", "image-download"],
"env": {
"BASE_BRANCH": "stable-1.0",
"COCKPIT_BOTS_REF": "main",
Expand Down
4 changes: 2 additions & 2 deletions tests-scan
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ def queue_test(job: Job, channel, options: argparse.Namespace) -> None:
"slug": slug,
"env": env,
"container": job.container,
# for updating naughty trackers
"secrets": ["github-token"],
# for updating naughty trackers and downloading private images
"secrets": ["github-token", "image-download"],
}
}

Expand Down
Loading