用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/openshift/hypershift --skill konflux-build命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | konflux-build |
| description | Create a manual Konflux build from a PR with configurable image expiry (default 30 days) |
Given a PR and a component name, create a manual PipelineRun that produces a container image. By default the image expires after 30 days. Use --non-expiring to produce a permanent image.
Build a specific component from a PR number (expires in 30 days):
/konflux-build 7813 hypershift-release-mce-26
Build from a PR URL (will prompt for component):
/konflux-build https://github.com/openshift/hypershift/pull/7813
Build a non-expiring image for a hotfix:
/konflux-build 7813 hypershift-operator --non-expiring
Build using a specific pipeline template:
/konflux-build 7813 .tekton/hypershift-release-mce-26-push.yaml
Build the main operator from a PR:
/konflux-build 7500 hypershift-operator
stone-prd-rh01).tekton/ on the base branch--non-expiring is specified)@sha256: digesthypershift-operator) or a path to a specific pipeline template (e.g., .tekton/hypershift-release-mce-26-push.yaml). If not specified, ask the user which component to build.--non-expiring is present in the arguments, produce a permanent image; otherwise set image-expires-after: 30dBefore doing anything else, verify the user is logged in to the correct cluster and project:
oc whoami --show-server and confirm it returns https://api.stone-prd-rh01.pg1f.p1.openshiftapps.com:6443. If not, stop and tell the user to log in:
oc login https://api.stone-prd-rh01.pg1f.p1.openshiftapps.com:6443
oc project -q and confirm it returns crt-redhat-acm-tenant. If not, switch to it:
oc project crt-redhat-acm-tenant
If the switch fails, stop and tell the user they don't have access to the required namespace.Only proceed to the next steps once both checks pass.
Use gh pr view <PR> --json headRefOid,headRefName,baseRefName,url to get:
headRefOid)baseRefName) — this determines which push template to useIf the user provided a specific pipeline file path (e.g., .tekton/hypershift-release-mce-26-push.yaml), use that template directly via git show <baseRef>:<pipeline-file>.
Otherwise, look in the .tekton/ directory of the PR's base branch for *-push.yaml files. Match by component name if provided, or list the available components and let the user pick.
The template lives on the base branch of the PR. Use git show <baseRef>:.tekton/ to list available templates, then git show <baseRef>:.tekton/<template-file> to read the chosen one.
Take the push pipeline template and resolve it into a concrete PipelineRun:
name with generateName based on the template's name field, replacing -on-push with -manual-push-pipelinesascode.tekton.dev/* annotations (these are PaC trigger annotations, not needed for manual runs){{revision}} and {{source_url}} with actual values:
{{revision}} → the PR's head commit SHA{{source_url}} → https://github.com/openshift/hypershift.git{{target_branch}} → the PR's base branch--non-expiring was specified: remove image-expires-after param entirelyimage-expires-after param is present with value 30d (add it if the template doesn't have one, or update it if it does){{ git_auth_secret }}) with git-auth-emptypipelineRef uses a resolver: git, keep it as-is. If it uses name:, keep it as-is./tmp/<component>-manual-push.yamlThe git-clone Tekton task requires the git-auth workspace to be a kubernetes.io/basic-auth typed secret. Since openshift/hypershift is a public repo, we use an empty secret instead of real credentials (which would be visible to all tenant users):
oc get secret git-auth-empty -n crt-redhat-acm-tenant 2>/dev/null || \
oc create secret generic git-auth-empty \
--type=kubernetes.io/basic-auth \
--from-literal=username='' \
--from-literal=password='' \
-n crt-redhat-acm-tenant
Display the generated YAML and ask for confirmation before applying. Clearly indicate whether the image will expire (and when) or be permanent.
oc create -f /tmp/<component>-manual-push.yaml
Report the PipelineRun name.
Poll oc get pipelinerun <name> every 30 seconds until it completes or disappears (archived).
Once done (or if the PipelineRun gets archived before we can check), use skopeo to get the image digest:
skopeo inspect --no-tags docker://<output-image-url>
Report the final image reference in @sha256: digest form, e.g.:
quay.io/redhat-user-workloads/crt-redhat-acm-tenant/<component>@sha256:<digest>
Also show per-architecture digests from the manifest list if it's a multi-arch build.
Remind the user whether the image expires (and when) or is permanent.
| Scenario | Action |
|---|---|
| Not logged in to OpenShift | Show oc login command and stop |
| Wrong namespace / no access | Show error and stop |
| PR not found | Show error with PR number |
| No matching push template | List available templates and ask user to pick |
| Multiple component matches | List matches and ask user to pick |
| PipelineRun creation fails | Show error details |
| PipelineRun archived before completion | Fall back to skopeo inspect to check the image directly |
oc CLI logged into the Konflux clustergh CLI authenticated with access to openshift/hypershiftskopeo for image inspectioncrt-redhat-acm-tenant namespace