Loading...
Loading...
Compare original and translation side by side
harness_createtriggerharness_createtriggertrigger:
name: PR Trigger
identifier: pr_trigger
orgIdentifier: default
projectIdentifier: my_project
pipelineIdentifier: ci_pipeline
source:
type: Webhook
spec:
type: Github
spec:
type: PullRequest
spec:
connectorRef: github_connector
autoAbortPreviousExecutions: true
payloadConditions:
- key: targetBranch
operator: Equals
value: main
headerConditions: []
jexlCondition: ""
actions:
- Open
- Reopen
- Synchronize
inputYaml: |
pipeline:
identifier: ci_pipeline
properties:
ci:
codebase:
build:
type: PR
spec:
number: <+trigger.prNumber>trigger:
name: PR Trigger
identifier: pr_trigger
orgIdentifier: default
projectIdentifier: my_project
pipelineIdentifier: ci_pipeline
source:
type: Webhook
spec:
type: Github
spec:
type: PullRequest
spec:
connectorRef: github_connector
autoAbortPreviousExecutions: true
payloadConditions:
- key: targetBranch
operator: Equals
value: main
headerConditions: []
jexlCondition: ""
actions:
- Open
- Reopen
- Synchronize
inputYaml: |
pipeline:
identifier: ci_pipeline
properties:
ci:
codebase:
build:
type: PR
spec:
number: <+trigger.prNumber>PushPullRequestIssueCommentReleasePushPullRequestIssueCommentReleasetrigger:
name: GitLab Push
identifier: gitlab_push
pipelineIdentifier: ci_pipeline
source:
type: Webhook
spec:
type: Gitlab
spec:
type: Push
spec:
connectorRef: gitlab_connector
payloadConditions:
- key: ref
operator: Contains
value: maintrigger:
name: GitLab Push
identifier: gitlab_push
pipelineIdentifier: ci_pipeline
source:
type: Webhook
spec:
type: Gitlab
spec:
type: Push
spec:
connectorRef: gitlab_connector
payloadConditions:
- key: ref
operator: Contains
value: maintrigger:
name: Nightly Build
identifier: nightly_build
orgIdentifier: default
projectIdentifier: my_project
pipelineIdentifier: ci_pipeline
source:
type: Scheduled
spec:
type: Cron
spec:
expression: "0 2 * * *" # 2 AM daily
inputYaml: |
pipeline:
identifier: ci_pipeline
properties:
ci:
codebase:
build:
type: branch
spec:
branch: main<minute> <hour> <day-of-month> <month> <day-of-week>trigger:
name: Nightly Build
identifier: nightly_build
orgIdentifier: default
projectIdentifier: my_project
pipelineIdentifier: ci_pipeline
source:
type: Scheduled
spec:
type: Cron
spec:
expression: "0 2 * * *" # 每日凌晨2点
inputYaml: |
pipeline:
identifier: ci_pipeline
properties:
ci:
codebase:
build:
type: branch
spec:
branch: main<分钟> <小时> <日期> <月份> <星期>trigger:
name: New Image Trigger
identifier: new_image
pipelineIdentifier: deploy_pipeline
source:
type: Artifact
spec:
type: DockerRegistry
spec:
connectorRef: dockerhub
imagePath: myorg/myimage
tag: <+trigger.artifact.build>
inputYaml: |
pipeline:
identifier: deploy_pipeline
stages:
- stage:
identifier: deploy
spec:
service:
serviceRef: my_servicetrigger:
name: New Image Trigger
identifier: new_image
pipelineIdentifier: deploy_pipeline
source:
type: Artifact
spec:
type: DockerRegistry
spec:
connectorRef: dockerhub
imagePath: myorg/myimage
tag: <+trigger.artifact.build>
inputYaml: |
pipeline:
identifier: deploy_pipeline
stages:
- stage:
identifier: deploy
spec:
service:
serviceRef: my_serviceDockerRegistryEcrGcrAcrNexus3RegistryAmazonS3DockerRegistryEcrGcrAcrNexus3RegistryAmazonS3Call MCP tool: harness_create
Parameters:
resource_type: "trigger"
org_id: "<organization>"
project_id: "<project>"
body: <trigger YAML>Call MCP tool: harness_list
Parameters:
resource_type: "trigger"
org_id: "<organization>"
project_id: "<project>"Call MCP tool: harness_create
Parameters:
resource_type: "trigger"
org_id: "<organization>"
project_id: "<project>"
body: <trigger YAML>Call MCP tool: harness_list
Parameters:
resource_type: "trigger"
org_id: "<organization>"
project_id: "<project>"payloadConditions:
- key: targetBranch
operator: Equals # Equals, NotEquals, In, NotIn, StartsWith, EndsWith, Contains, Regex
value: main
- key: sourceBranch
operator: StartsWith
value: feature/sourceBranchtargetBranchrefactiontagpayloadConditions:
- key: targetBranch
operator: Equals # Equals, NotEquals, In, NotIn, StartsWith, EndsWith, Contains, Regex
value: main
- key: sourceBranch
operator: StartsWith
value: feature/sourceBranchtargetBranchrefactiontagharness_getharness_getautoAbortPreviousExecutionsautoAbortPreviousExecutions