Migrate Existing Advanced CI workshop
<!--Workshop Agent Request Template
This issue structures your request for the Workshop Agent. Fill in ONLY the sections
relevant to your chosen mode — delete the other mode sections entirely.
HOW TO USE:
1. Choose your mode (Migrate, Generate, or Update)
2. Fill in the General section and your mode's section ONLY — delete the other two mode sections
3. Optionally fill in Customer Context
4. Create the issue
THEN IN DUO CHAT (the agent works in steps — you prompt each one):
5. Open Duo Chat → select "Workshop Agent" → toggle Agentic mode on
6. Step 1 — Plan: "Read issue #[number] and execute the [migrate/generate/update] workflow"
7. Step 2 — Execute: "Approved, generate the files" (or "make the updates")
8. Step 3 (optional): "Update changelog and log learnings" (or just one: "Now update the changelog" / "Log any learnings")
The agent stops after each step and waits for your next prompt.-->
## General
**Mode: Migrate**
**Topic: Gitlab Advanced CI**
**Target Audience:** Developers and DevOps professionals who have already completed the Intro to CI/CD workshop. They know basic `.gitlab-ci.yml` syntax, `needs:`, `rules:`, and `include:` — but haven't worked with advanced pipeline patterns. Mixed skill levels within that group, meaning some may be more infrastructure-leaning, others more developer-leaning. GitLab SaaS users specifically.
**Target Duration:**2 sessions × 90 minutes each, with a break between sessions. Total = 3 hours of instruction time
---
<!--========================-->
<!--MIGRATE MODE-->
<!--Fill this section if Mode = Migrate. Delete the Generate and Update sections.-->
<!--========================-->
## Migrate Details
**Source project:**
https://gitlab.com/gitlab-learn-labs/sample-projects/adv-ci-lab/advanced-ci-lab/
**Source files:**
* https://gitlab.com/gitlab-learn-labs/sample-projects/adv-ci-lab/advanced-ci-lab/-/blob/main/Lab%20Exercises/1_Container_registry.md?ref_type=heads
* https://gitlab.com/gitlab-learn-labs/sample-projects/adv-ci-lab/advanced-ci-lab/-/blob/main/Lab%20Exercises/2_dotenv.md?ref_type=heads
* https://gitlab.com/gitlab-learn-labs/sample-projects/adv-ci-lab/advanced-ci-lab/-/blob/main/Lab%20Exercises/3_parallel_matrix.md?ref_type=heads
* https://gitlab.com/gitlab-learn-labs/sample-projects/adv-ci-lab/advanced-ci-lab/-/blob/main/Lab%20Exercises/4_dynamic_pipeline.md?ref_type=heads
**Key adaptations needed:**
**`python1` / `python2` → single Swag Shop app + region axis**
| Source | Target |
|--------|--------|
| `$PROJECT_DIR: [python1, python2]` | `$REGION: [us, eu, apac]` |
| `$CI_REGISTRY_IMAGE/python1:$CI_COMMIT_SHA` | `$CI_REGISTRY_IMAGE/swag-shop:$CI_COMMIT_SHA` |
| `cd $PROJECT_DIR && docker build` | `docker build -f Dockerfile .` (runs from repo root) |
| `$PROJECT_DIR/imagevars.env` | `build.env` (flat, no subdirectory) |
| `build1` / `build2` job names | Single `build` job with `parallel:matrix` in Lab 4 |
| `container1_job` / `container2_job` | `validate-region` matrix job over `$REGION` |
| `template.yml` | `security-template.yml` (Swag Shop scenario: security team owns their scanner jobs) |
**Business scenario framing — rewrite per lab**
* Lab 1: team needs to containerise the Swag Shop and push versioned images to the registry
* Lab 2: build job needs to pass the exact image tag it pushed to the downstream test job
* Lab 3 (new): docker-build logic should be packaged as a reusable component the whole org can consume
* Lab 4: Swag Shop launching in three regions — validate each region's config in parallel
* Lab 5: security team wants to own their scanner jobs in a separate file; main pipeline generates and triggers it dynamically
**Two additions not in the source**
* Add `workflow:rules` block to the starting-state pipeline (new concept, no equivalent in source)
* Add `## 📋 Key snippets reference` section at the bottom of every lab file (attendees' in-session reference card — slides go out after the session)
Add some examples of using DAP during these lap exercises
**What to preserve from the source:**
**Pipeline patterns — copy directly, values only change**
* Hidden job template pattern (`.build`) as the Lab 1 starting point
* `artifacts:reports:dotenv` mechanism and `needs: artifacts: true/false` pattern
* `envsubst` generate → artifact → trigger flow for the dynamic child pipeline
* `strategy: depend` on trigger jobs
* Cumulative solution branch structure — keep `1-container-registry` through `5-dynamic-pipeline` naming
* The lab instructurions add a bonus lab that ties into each lab segment
**Lab instruction format — do not change**
* Emoji conventions (🚀 🧭 🎁 🆘)
* Numbered steps with complete inline YAML blocks
* Solution branch hint at the bottom of each lab (`🆘 Need help? See the X-branch`)
* Pipeline graph pause moments after each pipeline run
<!--e.g., "Keep the same number of files and time targets", "Preserve the CODEOWNERS exercise"-->
---
<!--========================-->
<!--GENERATE MODE-->
<!--Fill this section if Mode = Generate. Delete the Migrate and Update sections.-->
## Customer Context (Optional — all modes)
This is for a CSE enabled workshop and should be closely tied to the concepts in Basic CI workshop
<!--Fill this in if the workshop is being tailored for a specific customer engagement-->
**Customer vertical/industry:**
<!--e.g., Financial services, healthcare, public sector-->
**Customer environment:**
<!--e.g., GitLab.com SaaS, Self-Managed 18.9, AWS deployment, CLI-heavy workflows-->
**Specific customer pain points:**
<!--e.g., "They need SBOM compliance for FedRAMP", "Heavy Jenkins migration in progress"-->
---
<!--Add topic label: ~security, ~cicd, ~platform, ~project-management, ~duo-ai, ~basics, ~gitops-->
issue