diff --git a/.agents/skills/download-azure-integration-artifacts/SKILL.md b/.agents/skills/download-azure-integration-artifacts/SKILL.md new file mode 100644 index 00000000..9ec8b70b --- /dev/null +++ b/.agents/skills/download-azure-integration-artifacts/SKILL.md @@ -0,0 +1,39 @@ +--- +description: Download Prow azure-integration-test artifacts for a PR to logs/azure-integration-test- +user_invocable: true +--- + +# Download azure-integration-test artifacts + +Given a PR number (from user input or current branch context), download the full artifacts tree from the Prow azure-integration-test job. + +## Steps + +1. Get the PR number. If not provided, infer from the current branch: + ``` + gh pr view --json number -q .number + ``` + +2. Get the head branch name and the Prow link in one step: + ``` + gh pr view --json headRefName -q .headRefName + gh pr checks + ``` + From the `gh pr checks` output, find the line starting with `ci/prow/azure-integration-test`. The fourth column (tab-separated) is the Prow URL. + +3. Derive the GCS path from the Prow URL — no need to fetch any web pages: + - The Prow URL has the form `https://prow.ci.openshift.org/view/gs/` + - Strip the prefix `https://prow.ci.openshift.org/view/gs/` to get `` + - The gsutil source is `gs:///artifacts/` + +4. Create the destination directory and download: + ``` + mkdir -p logs/azure-integration-test- + gsutil -m cp -r gs:///artifacts/ logs/azure-integration-test-/ + ``` + + If `gsutil` is not available, try `gcloud storage cp -r` with the same paths. + +## Fallback + +If the URL pattern has changed (e.g. `gh pr checks` no longer returns a `prow.ci.openshift.org/view/gs/` URL for that check), fetch the Prow page with WebFetch and look for the Artifacts link. On the gcsweb artifacts page, look for the `gsutil` or `gcloud storage` command near the top. diff --git a/.claude b/.claude new file mode 120000 index 00000000..c0ca4685 --- /dev/null +++ b/.claude @@ -0,0 +1 @@ +.agents \ No newline at end of file diff --git a/.gitignore b/.gitignore index a0c13ae0..094ab493 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ trusted-cluster-gen /config/rbac/role.yaml /config/rbac/kustomization.yaml /lib/src/kopium +/logs /target bundle/manifests/ bundle/metadata/ diff --git a/REUSE.toml b/REUSE.toml index e4d0c391..6d203268 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -2,6 +2,7 @@ version = 1 [[annotations]] path = [ + ".agents/skills/*/*.md", ".cursor/rules/*.mdc", "*.md", "Cargo.lock",