0
0
GCPcloud~10 mins

Build triggers configuration in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete 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'
A"main"
B"build-config"
C"my-repo"
D"trigger-1"
Attempts:
3 left
💡 Hint
Common Mistakes
Using branch name instead of repository name.
Using project ID instead of repository name.
2fill in blank
medium

Complete 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'
A"develop"
B"my-repo"
C"feature-branch"
D"main"
Attempts:
3 left
💡 Hint
Common Mistakes
Using repository name instead of branch name.
Choosing a branch name that does not exist.
3fill in blank
hard

Fix 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'
A"branchName": "main"
B"branchName": "develop"
C"tagName": "v1.*"
D"commitSha": "abc123"
Attempts:
3 left
💡 Hint
Common Mistakes
Using tagName or commitSha instead of branchName.
Omitting the branchName field.
4fill in blank
hard

Fill 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'
A"branchName": "main"
B"tagName": "v1.*"
C"projectId": "my-project"
D"commitSha": "abc123"
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing tagName or commitSha where projectId or branchName should be.
Omitting projectId or branchName.
5fill in blank
hard

Fill 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'
A"repoName": "my-repo"
B"branchName": "main"
C"production"
D"projectId": "my-project"
Attempts:
3 left
💡 Hint
Common Mistakes
Incorrect quoting of substitution value.
Missing projectId or branchName fields.