Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
Your DevOps engineering team is configuring an automated continuous integration pipeline using Cloud Build for an application repository hosted on GitLab.
You must configure a Cloud Build trigger that meets the following criteria:
release/v1.0 or release/v2.4./gcbrun comment command before a build executes.How should you configure the Cloud Build trigger?
This option configures a standard Push to a branch trigger using basic wildcard globbing (release/v*.*), disables comment gating by setting Comment control to Not required, and places the trigger in the global region.
Push to a branch trigger executes only when commits are pushed directly to matching repository branches. It does not evaluate incoming merge requests (pull requests) before they are merged into the target branch.Not required) allows any contributor to initiate builds immediately upon opening a request, exposing the build project's compute resources and IAM credentials to untrusted code.*.*. Furthermore, 2nd generation GitLab triggers require regional alignment between the trigger and the repository connection.release/v*.* can result in syntax validation errors or unexpected pattern evaluations.The pipeline were designed to run continuous deployment tasks only after code has been directly committed or merged into the release branch by trusted automated release bots.
This option sets up a Cloud Build pull request trigger but disables comment control (Not required), attempting to offload external contributor validation and webhook filtering to an auxiliary Eventarc trigger routing merge request events.
Not required ensures that all merge requests immediately trigger a build upon creation or update, completely bypassing the requirement to gate untrusted external contributors with /gcbrun.You were building a custom asynchronous workflow where non-standard third-party event providers publish events into Google Cloud services rather than using native Cloud Build VCS integrations.
Cloud Build triggers integrated with external version control systems like GitLab and GitHub automate build execution based on repository events such as branch pushes, tag creations, or pull and merge requests. When connected via Developer Connect or 2nd generation repository connections, triggers utilize RE2 regular expression syntax to filter target branches or tags and offer granular comment control settings to safeguard build environments against unverified code execution.
^release/v[0-9]+\.[0-9]+$ accurately matches branches formatted as release/v1.0 or release/v2.4 while preventing accidental invocation from non-matching feature branches.Required except for owners and collaborators allows trusted project members to trigger builds automatically on merge requests while forcing external contributors' merge requests to wait until an authorized collaborator reviews the changes and comments /gcbrun.This configuration directly satisfies all operational, security, and architectural constraints by combining native RE2 branch targeting, regional alignment, and automated collaborator comment gating without introducing third-party webhook middleware.
This option configures a pull request trigger using Perl-Compatible Regular Expressions (PCRE) lookahead patterns, enforces the Required comment control setting for every contributor, and locates the trigger in the global region.
Required forces all contributors—including repository owners and core team collaborators—to comment /gcbrun before any build can run. The requirement specifies that owners and collaborators should not be blocked.global if the repository connection was established in a regional location, as the trigger and repository connection regions must match.Required creates unnecessary operational friction for internal core developers on routine merge requests.The organization had a mandatory compliance policy requiring two-person review on every single pull request, regardless of whether the author is an administrator or a repository owner.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated