Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to specify the source repository for the build trigger.
GCP
{
"triggerTemplate": {
"projectId": "my-project",
"repoName": [1],
"branchName": "main"
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using branch name instead of repository name.
Using project ID instead of repository name.
✗ Incorrect
The 'repoName' field must be the name of the source repository, such as "my-repo".
2fill in blank
mediumComplete the code to specify the branch filter for the build trigger.
GCP
{
"triggerTemplate": {
"projectId": "my-project",
"repoName": "my-repo",
"branchName": [1]
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using repository name instead of branch name.
Choosing a branch name that does not exist.
✗ Incorrect
The 'branchName' field specifies which branch triggers the build, commonly "main".
3fill in blank
hardFix the error in the build trigger configuration by completing the missing field.
GCP
{
"name": "my-trigger",
"description": "Trigger on push to main",
"triggerTemplate": {
"projectId": "my-project",
"repoName": "my-repo",
[1]
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using tagName or commitSha instead of branchName.
Omitting the branchName field.
✗ Incorrect
The 'branchName' field is required to specify which branch triggers the build; here it should be "main".
4fill in blank
hardFill both blanks to complete the build trigger event configuration.
GCP
{
"triggerTemplate": {
"repoName": "my-repo",
[1],
[2]
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing tagName or commitSha where projectId or branchName should be.
Omitting projectId or branchName.
✗ Incorrect
The 'projectId' and 'branchName' fields are needed to specify the project and branch for the trigger.
5fill in blank
hardFill all three blanks to complete the build trigger filter and substitution configuration.
GCP
{
"triggerTemplate": {
[1],
[2],
"substitutions": {
"_ENV": [3]
}
}
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Incorrect quoting of substitution value.
Missing projectId or branchName fields.
✗ Incorrect
The trigger needs projectId, branchName, and a substitution value for _ENV set to "production".