Dependency Preparation
The following tools do not exist; first try to install them automatically:
- python3
- pipx
- jq The context or environment variables'internal variablesare missing; terminate the run and prompt the user to complete the relevant variables.
Workflow
- First confirm that dependencies and variables are available.
- Check before every use whether
eliteforge-poseidon-cliis installed.- If not installed, run:
pipx install eliteforge-poseidon-cli
- If not installed, run:
- Run before every use:
pipx upgrade eliteforge-poseidon-cli - Look at the help first before executing specific commands, to avoid hardcoding capability descriptions.
- Descriptions of all subcommands
poseidon -h - Metadata section: Application and configuration metadata management:
poseidon metadata -h- Note: When creating an application, it depends on a gitlab repository; you can use
$gitlab-cli-skillsFirst create the project repository on the Saidi GitLab platform
- Note: When creating an application, it depends on a gitlab repository; you can use
- Build section: Trigger builds, query build records and context
poseidon build -h - Operations section: Release, log retrieval, and restart
poseidon ops -h - Atomic commands:
poseidon atomic -h- Build and release the specified application: poseidon atomic rebuild-and-deploy triggers a build by application name/ID and polls until the build is complete, and checks whether the instance has finished starting; by default it automatically deploys to the development environment
- View the error logs of an application instance: poseidon atomic runtime-errors retrieves runtime error logs by application name, and fetches the context at the hit time point one by one
- Descriptions of all subcommands
- Execute commands according to the user's goal; you can write scripts to orchestrate the interfaces yourself.
Environment Variables
ELITEFORGE_SKILL_POSEIDON_BASE_URL[optional] Platform URL; defaults tohttps://poseidon.cisdigital.cn/.ELITEFORGE_SKILL_POSEIDON_USERNAME[required] Platform username for account authentication.ELITEFORGE_SKILL_POSEIDON_PASSWD[required] Platform password for account authentication.ELITEFORGE_SKILL_POSEIDON_AUTH_TYPE[optional] Authentication mode; supportsACCOUNT,API_TOKEN, orBEARER, and defaults toACCOUNT.ELITEFORGE_SKILL_POSEIDON_PRODUCT_ID[optional] Product ID; specific commands may override it with command parameters.ELITEFORGE_SKILL_POSEIDON_PROJECT_ID[optional] Project ID; specific commands may override it with command parameters.ELITEFORGE_SKILL_POSEIDON_AUTH_APP_ID[conditional] Required whenELITEFORGE_SKILL_POSEIDON_AUTH_TYPE=API_TOKEN.ELITEFORGE_SKILL_POSEIDON_AUTH_APP_SECRET[conditional] Required whenELITEFORGE_SKILL_POSEIDON_AUTH_TYPE=API_TOKEN.ELITEFORGE_SKILL_POSEIDON_TOKEN[conditional] Required whenELITEFORGE_SKILL_POSEIDON_AUTH_TYPE=BEARER.
Output Rules
- Keep the output concise; when necessary, use
jqand other Linux pipeline tools to process the interface JSON response. - On failure, return the actually executed command and the key error message
- When more command descriptions are needed, continue guiding the user to view the corresponding
-h