The EnvGene pipeline (pipeline.yml
) is a comprehensive GitHub Actions workflow that supports both manual UI triggers and API calls. It provides environment generation, credential rotation, and various deployment capabilities.
The pipeline can be triggered in two ways:
- Triggered through GitHub Actions UI
- Uses individual input fields
- Best for manual testing and development
- Triggered via GitHub API
- Uses a single JSON string with all parameters
- Best for automation and CI/CD integration
- Go to your GitHub repository
- Navigate to Actions tab
- Select EnvGene Execution workflow
- Click Run workflow
- Fill in the required parameters
- Click Run workflow
Field | Required | Type | Description | Default |
---|---|---|---|---|
ENV_NAMES |
Yes | String | Comma-separated environment names | - |
DEPLOYMENT_TICKET_ID |
No | String | Deployment ticket ID | "" |
ENV_TEMPLATE_VERSION |
No | String | Environment template version | "" |
ENV_BUILDER |
No | Choice | Enable environment building | "true" |
GET_PASSPORT |
No | Choice | Enable passport retrieval | "false" |
CMDB_IMPORT |
No | Choice | Enable CMDB import | "false" |
GITHUB_PIPELINE_API_INPUT |
No | String | API input string (for API mode) | - |
Basic Environment Generation:
ENV_NAMES
:test-cluster/e01,test-cluster/e02
ENV_BUILDER
:true
DEPLOYMENT_TICKET_ID
:TICKET-123
ENV_TEMPLATE_VERSION
:qubership_envgene_templates:0.0.2
Use the GitHub API to trigger the workflow:
curl -X POST \
-H "Authorization: token YOUR_GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/OWNER/REPO/actions/workflows/pipeline.yml/dispatches \
-d '{
"ref": "main",
"inputs": {
"GITHUB_PIPELINE_API_INPUT": "YOUR_API_INPUT_STRING"
}
}'
The GITHUB_PIPELINE_API_INPUT
can be provided in three formats:
{
"ENV_NAMES": "test-cluster/e01,test-cluster/e02",
"ENV_BUILDER": "true",
"DEPLOYMENT_TICKET_ID": "TICKET-123",
"ENV_TEMPLATE_VERSION": "qubership_envgene_templates:0.0.2",
"GET_PASSPORT": "false",
"CMDB_IMPORT": "false"
}
ENV_NAMES=test-cluster/e01,test-cluster/e02
ENV_BUILDER=true
DEPLOYMENT_TICKET_ID=TICKET-123
ENV_TEMPLATE_VERSION=qubership_envgene_templates:0.0.2
GET_PASSPORT=false
CMDB_IMPORT=false
ENV_NAMES: test-cluster/e01,test-cluster/e02
ENV_BUILDER: true
DEPLOYMENT_TICKET_ID: TICKET-123
ENV_TEMPLATE_VERSION: qubership_envgene_templates:0.0.2
GET_PASSPORT: false
CMDB_IMPORT: false
Variable | Type | Description |
---|---|---|
ENV_NAMES |
String | Comma-separated list of environment names |
Variable | Default | Description |
---|---|---|
ENV_BUILDER |
true | Enable environment building |
GET_PASSPORT |
false | Enable passport retrieval |
CMDB_IMPORT |
false | Enable CMDB import |
ENV_INVENTORY_INIT |
false | Initialize environment inventory |
GENERATE_EFFECTIVE_SET |
false | Generate effective set |
ENV_TEMPLATE_TEST |
false | Test environment template |
SD_DELTA |
false | Enable SD delta processing |
CRED_ROTATION_FORCE |
false | Force credential rotation |
Variable | Default | Description |
---|---|---|
DEPLOYMENT_TICKET_ID |
"" | Deployment ticket ID |
ENV_TEMPLATE_VERSION |
"" | Environment template version |
ENV_TEMPLATE_NAME |
"" | Environment template name |
SD_VERSION |
"" | SD version |
SD_SOURCE_TYPE |
"" | SD source type |
Variable | Default | Description |
---|---|---|
SD_DATA |
"{}" | SD data in JSON format |
ENV_SPECIFIC_PARAMETERS |
"{}" | Environment-specific parameters |
CRED_ROTATION_PAYLOAD |
"{}" | Credential rotation payload |
API Call:
curl -X POST \
-H "Authorization: token YOUR_GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/OWNER/REPO/actions/workflows/pipeline.yml/dispatches \
-d '{
"ref": "main",
"inputs": {
"GITHUB_PIPELINE_API_INPUT": "{\"ENV_NAMES\": \"test-cluster/e01,test-cluster/e02\", \"ENV_BUILDER\": \"true\", \"DEPLOYMENT_TICKET_ID\": \"TICKET-123\", \"ENV_TEMPLATE_VERSION\": \"qubership_envgene_templates:0.0.2\"}"
}
}'
Key-Value Format:
curl -X POST \
-H "Authorization: token YOUR_GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/OWNER/REPO/actions/workflows/pipeline.yml/dispatches \
-d '{
"ref": "main",
"inputs": {
"GITHUB_PIPELINE_API_INPUT": "ENV_NAMES=test-cluster/e01,test-cluster/e02\nENV_BUILDER=true\nDEPLOYMENT_TICKET_ID=TICKET-123\nENV_TEMPLATE_VERSION=qubership_envgene_templates:0.0.2"
}
}'
API Call:
curl -X POST \
-H "Authorization: token YOUR_GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/OWNER/REPO/actions/workflows/pipeline.yml/dispatches \
-d '{
"ref": "main",
"inputs": {
"GITHUB_PIPELINE_API_INPUT": "{\"ENV_NAMES\": \"test-cluster/e01\", \"ENV_BUILDER\": \"true\", \"DEPLOYMENT_TICKET_ID\": \"TICKET-123\", \"ENV_TEMPLATE_VERSION\": \"qubership_envgene_templates:0.0.2\", \"CRED_ROTATION_PAYLOAD\": \"{\\\"rotation_items\\\":[{\\\"namespace\\\":\\\"e01-bss\\\",\\\"application\\\":\\\"postgres\\\",\\\"context\\\":\\\"deployment\\\",\\\"parameter_key\\\":\\\"POSTGRES_DBA_USER\\\",\\\"parameter_value\\\":\\\"new_user\\\"}]}\", \"CRED_ROTATION_FORCE\": \"true\"}"
}
}'
Key-Value Format:
curl -X POST \
-H "Authorization: token YOUR_GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/OWNER/REPO/actions/workflows/pipeline.yml/dispatches \
-d '{
"ref": "main",
"inputs": {
"GITHUB_PIPELINE_API_INPUT": "ENV_NAMES=test-cluster/e01\nENV_BUILDER=true\nDEPLOYMENT_TICKET_ID=TICKET-123\nENV_TEMPLATE_VERSION=qubership_envgene_templates:0.0.2\nCRED_ROTATION_PAYLOAD={\"rotation_items\":[{\"namespace\":\"e01-bss\",\"application\":\"postgres\",\"context\":\"deployment\",\"parameter_key\":\"POSTGRES_DBA_USER\",\"parameter_value\":\"new_user\"}]}\nCRED_ROTATION_FORCE=true"
}
}'
API Call:
curl -X POST \
-H "Authorization: token YOUR_GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/OWNER/REPO/actions/workflows/pipeline.yml/dispatches \
-d '{
"ref": "main",
"inputs": {
"GITHUB_PIPELINE_API_INPUT": "{\"ENV_NAMES\": \"test-cluster/e01,test-cluster/e02\", \"ENV_BUILDER\": \"true\", \"GET_PASSPORT\": \"true\", \"CMDB_IMPORT\": \"true\", \"GENERATE_EFFECTIVE_SET\": \"true\", \"DEPLOYMENT_TICKET_ID\": \"TICKET-123\", \"ENV_TEMPLATE_VERSION\": \"qubership_envgene_templates:0.0.2\", \"ENV_TEMPLATE_NAME\": \"standard-template\", \"SD_DATA\": \"{\\\"version\\\":\\\"1.0\\\",\\\"environment\\\":\\\"test\\\"}\", \"ENV_SPECIFIC_PARAMETERS\": \"{\\\"custom_param\\\":\\\"value\\\"}\"}"
}
}'
When using credential rotation, the CRED_ROTATION_PAYLOAD
must follow this structure:
{
"rotation_items": [
{
"namespace": "e01-bss",
"application": "postgres",
"context": "deployment",
"parameter_key": "POSTGRES_DBA_USER",
"parameter_value": "new_user"
}
]
}
Field | Required | Description |
---|---|---|
namespace |
Yes | Target namespace |
application |
No | Application name |
context |
Yes | Context: pipeline , deployment , or runtime |
parameter_key |
Yes | Parameter key to rotate |
parameter_value |
Yes | New parameter value |
Error: ENV_NAMES is required for API mode but not found in input
Solution: Ensure your API input contains ENV_NAMES
with valid environment names:
{
"ENV_NAMES": "test-cluster/e01,test-cluster/e02"
}
Error: CRED_ROTATION_PAYLOAD must be a valid JSON object
Solution: Use proper JSON format with escaped quotes:
{
"CRED_ROTATION_PAYLOAD": "{\\\"rotation_items\\\":[{\\\"namespace\\\":\\\"e01-bss\\\"}]}"
}
Error: Matrix vector 'environment' does not contain any values
Solution: Ensure ENV_NAMES
contains valid environment names with proper format (e.g., cluster/environment
).
Error: YAML parsing fails with unquoted values
Solution: Use JSON format instead of YAML-like strings, or ensure proper quoting.
The pipeline provides extensive debug information:
- API Mode Detection: Shows whether the pipeline is running in API mode
- Variable Processing: Shows which variables were loaded from API input vs. defaults
- Validation Results: Shows validation status for each variable
- Environment Processing: Shows how environment names are processed
- Check Pipeline Logs: Look for "🔍" prefixed debug messages
- Verify Environment Variables: Check the "Input Parameters Processing" job
- Validate JSON: Use online JSON validators for complex payloads
- Test API Calls: Use tools like Postman or curl for API testing
- Use JSON Format: Prefer JSON format for API input when possible
- Escape Quotes Properly: Use double escaping for nested JSON:
\\\"
- Validate Input: Test your API input before sending
- Use Descriptive Ticket IDs: Include meaningful deployment ticket IDs
- Version Control: Always specify
ENV_TEMPLATE_VERSION
for reproducibility
For issues and questions:
- Check the pipeline logs for detailed error messages
- Verify your API input format
- Test with simple examples first
- Review the validation rules in the documentation