Skip to content

Commit

Permalink
Add script field in cloud build trigger (#6701)
Browse files Browse the repository at this point in the history
* added_support_for_script_attr

* added script field in tests

* fixing the tests
  • Loading branch information
AarshDhokai authored Oct 19, 2022
1 parent d2f1cd3 commit 4411a3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mmv1/products/cloudbuild/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,11 @@ objects:
have completed successfully. If `wait_for` is empty, this build step
will start when all previous build steps in the `Build.Steps` list
have completed successfully.
- !ruby/object:Api::Type::String
name: 'script'
description: |
A shell script to be executed in the step.
When script is provided, the user cannot specify the entrypoint or args.
- !ruby/object:Api::Type::NestedObject
name: 'artifacts'
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ resource "google_cloudbuild_trigger" "<%= ctx[:primary_resource_id] %>" {
secret_env = ["MY_SECRET"]
}

step {
name = "ubuntu"
script = "echo hello" # using script field
}

source {
storage_source {
bucket = "mybucket"
Expand Down

0 comments on commit 4411a3b

Please sign in to comment.