client Command
The pipeline client command is used to connect to a Pipeline Server and execute Pipeline via WebSocket. The client sends Pipeline configuration to the server and receives execution logs and results in real-time.
Basic Usage
bash
pipeline client [options]Command Options
-c, --config
Specify the Pipeline configuration file path (required).
- Type: String
- Environment Variable:
CONFIG - Required: Yes
- Supported Formats:
- Local file path:
pipeline.yaml - HTTP/HTTPS URL:
https://example.com/pipeline.yaml
- Local file path:
Example:
bash
pipeline client -c pipeline.yaml -s ws://localhost:8080-s, --server
Specify the Pipeline Server address (required).
- Type: String
- Environment Variable:
SERVER - Required: Yes
- Format:
ws://host:portorwss://host:port
Example:
bash
pipeline client -c pipeline.yaml -s ws://localhost:8080
pipeline client -c pipeline.yaml -s wss://pipeline.example.comWorkflow
- Load Configuration: Load Pipeline configuration from local file or remote URL
- Connect to Server: Connect to Pipeline Server via WebSocket
- Send Configuration: Send Pipeline configuration to server
- Receive Logs: Receive Pipeline execution logs (stdout/stderr) in real-time
- Wait for Completion: Wait for Pipeline execution to complete or fail
- Close Connection: Close WebSocket connection
Usage Examples
Example 1: Basic Usage
bash
# Start server (in another terminal)
pipeline server
# Execute Pipeline with client
pipeline client \
-c pipeline.yaml \
-s ws://localhost:8080Output Format
The client will output Pipeline execution logs in real-time:
- Standard Output: Pipeline stdout output
- Standard Error: Pipeline stderr output
- Execution Result: Pipeline execution completion or failure information
Example Output:
[workflow] start
[workflow] version: 1.7.1
[workflow] name: My Pipeline
[stage(1/2): build] start
[job(1/1): build-job] start
[step(1/1): compile] start
Compiling...
[step(1/1): compile] done
[job(1/1): build-job] done
[stage(1/2): build] done
[workflow] doneError Handling
Connection Error
If unable to connect to server, client will output error:
failed to connect to server: connection refusedAuthentication Error
If authentication fails, client will output error:
authentication failedPipeline Execution Error
If Pipeline execution fails, client will output error and exit with non-zero exit code.
