You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): add pipeline build and view commands with authentication (#6762)
* feat(cli): add pipeline build and view commands with authentication support
- Add build command to create and run pipelines from pipeline.yml files
- Add view command to monitor pipeline status with watch and list options
- Implement authentication context with session management and token handling
- Add configuration management for global and project-level settings
- Integrate with Erda API endpoints for pipeline operations and metadata
- Provide branch detection and validation for pipeline execution context
- Support verbose output mode for debugging API requests and responses
* test(cli): add comprehensive unit tests for CLI components
- Add TestNormalizePipelineYmlName for pipeline name normalization logic
- Add TestGlobalConfigResolvedHost for config host resolution
- Add TestSetAndGetGlobalConfigFromFile for config file operations
- Add TestGetGlobalConfigFromSupportsLegacyServerField for legacy field handling
- Add TestDecodeLoginStatusWithTokenResponse for token response decoding
- Add TestDecodeLoginStatusWithLegacySessionResponse for session response decoding
- Add TestContextCurrentAuthInfoFallsBackToOpenapiHost for auth fallback logic
- Add multiple tests for resolveBaseHost function with different configuration sources
- Add TestLatestPipelineID for pipeline ID selection logic
- Add TestDeleteSessionInfoFromMap for session management
- Add TestParseGitRemoteURLWithHTTPS for HTTPS URL parsing
- Add TestParseGitRemoteURLWithSSHScpStyle for SSH URL parsing
- Add TestParseGitRemoteURLRejectsInvalidRemote for invalid URL rejection
* feat(cli): add authentication and session management features
- Implement login command with persistent host configuration
- Add logout command to remove authentication information
- Create whoami command to display current user session details
- Integrate session management with automatic token refresh
- Support environment variable and config file based host resolution
- Add interactive authentication with username/password prompts
- Implement session storage and retrieval mechanisms
- Add support
* test(cli): add comprehensive test coverage for CLI components
- Add TestNormalizePipelineYmlName for pipeline YAML name normalization
- Implement TestGlobalConfigResolvedHost and related config file tests
- Add TestDecodeLoginStatus with token and legacy session response tests
- Include host resolution fallback mechanism tests in root command
- Add TestLatestPipelineID for pipeline ID selection logic
- Implement TestDeleteSessionInfoFromMap for session management
- Add Git remote URL parsing tests with HTTPS and SSH formats
LongHelp: `With global -V (--verbose): prints the JSON body sent to POST /api/cicds and the full HTTP response body when the call fails or returns success=false, in addition to the HTTP client debug log.`,
0 commit comments