Automated GitOps Promotion
CapitalOne ☯️ Medium CI/CD
Beginner Mode

Start your terminal to use beginner mode.

Objective

Two repositories exist: repo-a (application source) and repo-b (Kubernetes configuration with values.yaml). When code is pushed to repo-a, the pipeline must build a Docker image tagged with the short Git SHA and update repo-b to use the new tag.

Task

Complete the workflow at /home/interview/repo-a/.github/workflows/promote.yml that triggers on push to main. The repo-b update step is already provided. Add two missing steps: compute the short SHA from $GITHUB_SHA using cut -c1-7 and store it in $GITHUB_ENV as SHORT_SHA, then build a Docker image tagged with $SHORT_SHA.

File Path

  • Workflow: /home/interview/repo-a/.github/workflows/promote.yml
  • Config: /home/interview/repo-b/values.yaml

Terminal requires a larger screen

Open this page on a desktop or tablet (≥ 768px) to launch the terminal and practice hands-on.

Linux Terminal Environment

Write and execute your solution in the terminal below.

Sign In

Track

Question Difficulty Company Access
Need more practice in this area? Explore more questions →