konflux-build
БесплатноБез исполняемых скриптовНе проверенCreate a manual Konflux build from a PR with configurable image expiry (default 30 days)
от openshift★ 556 звёзд на GitHubОб этом скилле
Create a manual Konflux build from a PR
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.
Usage Examples
Build a specific component from a PR number (expires in 30 days):
/konflux-build 7813 hypershift-release-mce-26Build from a PR URL (will prompt for component):
/konflux-build https://github.com/openshift/hypershift/pull/7813Build a non-expiring image for a hotfix:
/konflux-build 7813 hypershift-operator --non-expiringBuild using a specific pipeline template:
/konflux-build 7813 .tekton/hypershift-release-mce-26-push.yamlBuild the main operator from a PR:
/konflux-build 7500 hypershift-operator
What This Command Does
- Verifies you are logged into the Konflux cluster (
stone-prd-rh01) - Resolves the PR to get its head commit SHA and base branch
- Finds the matching push pipeline template from
.tekton/on the base branch - Generates a manual PipelineRun YAML with template variables resolved
- Sets image expiry to 30 days (or removes it if
--non-expiringis specified) - Creates the PipelineRun and polls until completion
- Reports the final image reference with
@sha256:digest
Input
- PR: $ARGUMENTS (GitHub PR URL or number for openshift/hypershift)
- Component or pipeline file: either a component name (e.g.,
hypershift-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. - If
--non-expiringis present in the arguments, produce a permanent image; otherwise setimage-expires-after: 30d
Steps
0. Pre-check: verify OpenShift login
Before doing anything else, verify the user is logged in to the correct cluster and project:
- Run
oc whoami --show-serverand confirm it returnshttps://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 - Run
oc project -qand confirm it returnscrt-redhat-acm-tenant. If not, switch to it:
If the switch fails, stop and tell the user they don't have access to the required namespace.oc project crt-redhat-acm-tenant
Only proceed to the next steps once both checks pass.
1. Resolve the PR
Use gh pr view <PR> --json headRefOid,headRefName,baseRefName,url to get:
- The commit SHA (
headRefOid) - The base branch (
baseRefName) — this determines which push template to use - The PR URL for reference
2. Find the push pipeline template
If 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.
3. Generate the PipelineRun YAML
Take the push pipeline template and resolve it into a concrete PipelineRun:
- Replace
namewithgenerateNamebased on the template'snamefield, replacing-on-pushwith-manual-push- - Remove all
pipelinesascode.tekton.dev/*annotations (these are PaC trigger annotations, not needed for manual runs) - Replace
{{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
- Image expiry handling:
- If
--non-expiringwas specified: removeimage-expires-afterparam entirely - Otherwise: ensure an
image-expires-afterparam is present with value30d(add it if the template doesn't have one, or update it if it does)
- If
- Replace the git-auth workspace secret reference (
{{ git_auth_secret }}) withgit-auth-empty - If
pipelineRefuses aresolver: git, keep it as-is. If it usesname:, keep it as-is. - Write the YAML to
/tmp/<component>-manual-push.yaml
4. Ensure the git-auth-empty secret exists
The 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
5. Show the user the PipelineRun YAML and confirm
Display the gener
Установить konflux-build в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл konflux-build?
Create a manual Konflux build from a PR with configurable image expiry (default 30 days)
Как установить скилл konflux-build?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл konflux-build запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic