Your team keeps Beam pipeline code and the Airflow DAG that invokes it in a single Git repository. You need a CI/CD workflow that automatically runs tests, builds an immutable Flex Template image, deploys the template and DAG to the dev Cloud Composer environment, and, after manual sign-off, promotes the exact same artifacts to production. Which approach meets these requirements with the least manual effort and provides a clear rollback path?
Use a GitHub Actions workflow that pushes DAG files directly into the dev Composer bucket; promote to production by manually re-running the Dataflow job from the Cloud Console with the newest template.
Create a Cloud Build trigger on commits to main that runs a three-stage cloudbuild.yaml: (1) execute unit tests; (2) build the Flex Template image tagged with the commit SHA, generate the template JSON, and copy the JSON and DAG file to the dev Composer bucket using gsutil cp; (3) after a Cloud Build manual approval, copy the same tagged image, template JSON, and DAG file to the production buckets with gsutil cp and gcloud composer environments storage dags import.
Adopt Cloud Deploy to release DAG files to Composer buckets, but continue building the Flex Template manually in Cloud Shell and launching jobs in each environment via gcloud commands.
Configure one Cloud Build trigger that always builds the Flex Template with the "latest" tag and uploads the template JSON and DAG file simultaneously to both dev and prod Composer buckets on every commit, skipping any approval steps.
A multi-stage Cloud Build pipeline can satisfy all requirements. The first stage runs unit tests. The second stage executes "gcloud dataflow flex-template build", specifying the container image name and JSON spec file with the current Git commit SHA so that the artifacts are immutable. It then uses gsutil cp to copy the JSON file and the DAG to the dev environment's Cloud Storage dags/ folder, where Cloud Composer automatically discovers the new DAG. A built-in Cloud Build approval pause is configured; once approved, a third stage reuses the same immutable tags to copy the JSON and DAG to the production buckets (or invokes "gcloud composer environments storage dags import"). By reusing the exact artifacts and enforcing a manual approval, the pipeline minimizes manual work while enabling deterministic rollbacks. The other options either skip approvals, rely on mutable "latest" tags, or introduce manual, error-prone promotion steps.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a Flex Template in Dataflow?
Open an interactive chat with Bash
How does Cloud Build support manual approvals in a CI/CD pipeline?
Open an interactive chat with Bash
What does gsutil cp do, and why is it used in this pipeline?
Open an interactive chat with Bash
What is a Flex Template in Dataflow?
Open an interactive chat with Bash
What is the role of Cloud Build in the described solution?
Open an interactive chat with Bash
How does Cloud Composer discover and use new DAGs?
Open an interactive chat with Bash
GCP Professional Data Engineer
Ingesting and processing the data
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .