sippy-update-job-variant
Interactively update variants for a CI job
от openshift★ 36 звёзд на GitHub
Установить sippy-update-job-variant в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Update Job Variant
This command provides an interactive workflow to update variant assignments for CI jobs by modifying the variant registry Go code.
Arguments (all optional)
[job-pattern]: Pattern (substring or full job name) that identifies the CI job(s) to update (e.g.,-hypershift-,-metal-ipi-, or full job name likeperiodic-ci-openshift-hypershift-release-4.16-periodics-e2e-aws-ovn)[category]: Variant category to update (e.g., Platform, Architecture, Topology)[value]: New value to set for the variant category
If any arguments are not provided, you will prompt the user interactively.
Workflow
IMPORTANT: Argument Parsing Before starting the workflow, check if the user provided any arguments:
- Parse the command invocation to extract any provided arguments
- Normalize the job pattern, whether provided as an argument or entered interactively: trim surrounding whitespace, reject a blank result (an empty pattern matches every job), and lowercase it (setters compare against the lowercased job name, so uppercase patterns never match)
- If all three arguments (job-pattern, category, value) are provided:
- Validate the category exists in the snapshot file
- Skip the corresponding prompting steps
- Use the provided values directly
- If some arguments are missing, prompt only for the missing ones
- If no arguments are provided, follow the full interactive workflow below
You will guide the user through the following steps (skipping steps where arguments were provided):
Prompt for a Job Pattern: Ask the user to enter a pattern that identifies the CI job(s) they want to update. This can be either a full job name or a substring. This will be used to add pattern matching logic to the Go code.
- Example full job name:
periodic-ci-openshift-hypershift-release-4.16-periodics-e2e-aws-ovn - Example substrings:
-hypershift-,-metal-ipi-,-fips- - Important: Both full job names and substrings are acceptable. Accept whatever the user provides without asking for clarification, then normalize it as described in Argument Parsing.
- Advise the user that more specific patterns avoid unintended matches (e.g.,
-metal-ipi-ovn-ipv6-instead of just-metal-)
- Example full job name:
Select Variant Category: Extract variant categories programmatically and present as a numbered list:
- Run:
grep -E "^ [A-Z]" pkg/variantregistry/snapshot.yaml | cut -d: -f1 | sed 's/^ //' | sort -u - This extracts all unique variant categories from the snapshot file
- Present the list with numbers (1, 2, 3, etc.) and ask the user to select by number
- Run:
Select New Value: Based on the chosen category, extract possible values programmatically and present as a numbered list:
- For most categories, extract values from the snapshot:
grep "^ <CategoryName>:" pkg/variantregistry/snapshot.yaml | cut -d: -f2 | sed 's/^ //' | sed 's/"//g' | sort -u - Present the unique values as a numbered list and ask the user to select by number
- For Release-related variants (Release, FromRelease, FromReleaseMajor, FromReleaseMinor, ReleaseMajor, ReleaseMinor), allow free-text input instead of showing a numbered list
- For most categories, extract values from the snapshot:
Modify the Go Code: Update
pkg/variantregistry/ocp.goto add the pattern matching logic:- Find the appropriate setter function for the selected variant category (e.g.,
setPlatform,setArchitecture,setTopology, etc.) - Add an entry to the pattern matching logic in that function with the pattern and new value
- Follow the existing code style and pattern structure (see examples in the file)
- Pay special attention to pattern ordering! The functions use early return, so the first matching pattern wins.
- More specific patterns come before more generic patterns
- Example: In
setPlatform, "-rosa" must come before "-aws" because ROSA jobs contain "aws" - Example: In
setOwner, "-perfscale" must come before "-qe" because perfscale jobs may contain "qe"
- Before adding the new pattern, analyze existing patterns in the function to determine the correct insertion point
- Check if the new pattern might overlap with existing patterns and ensure correct precedence
- Find the appropriate setter function for the selected variant category (e.g.,
Preview Changes with Test: Run the variant snapshot test to see what will change:
Execute:
status=0 output="$(go test -v -run TestVariantsSnapshot ./pkg/variantregistry 2>&1)" || status=$? if printf '%s\n' "$output" | grep -q "Summary of changes:"; then printf '%s\n' "$output" | awk '/Summary of changes:/{show=1} show' else printf '%s\n' "$output" fi exit "$status"Parse this output to extract the variant category changed, old/new values, affected jobs, and total count
Display the summary to the user
Apply Changes: Execute
make update-variantsto regeneratepkg/variantregistry/snapshot.yamlVerify Unintended Changes (optional manual step):
- Sugg
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sippy-update-job-variant?
Interactively update variants for a CI job
Как установить скилл sippy-update-job-variant?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sippy-update-job-variant запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…