Skip to content
CNPEGitOps and Continuous DeliverySingle nodeHard

CI/CD with Tekton: a two-task release pipeline passing a result

Scenario cnpe-git-004 · about 18 minutes · 9 points · 6 grader checks

Build a Tekton Pipeline whose first Task emits the release version as a result and whose second Task publishes it into the staging namespace with kubectl, then run it.

  • tekton
  • pipeline
  • ci-cd
  • task-results
  • serviceaccount
  • continuous-delivery

What you will practise

  • Write Tekton Tasks with params and results
  • Pass a result between pipeline tasks
  • Run a PipelineRun under a dedicated ServiceAccount

Start this lab

With the CLI installed and signed in, this command provisions a single node cluster on your Mac, applies the scenario setup and prints the task below.

goldenkube start cnpe-git-004

Task

The task text exactly as the CLI shows it. Solve it on the cluster, then run goldenkube submit.

Tekton Pipelines is installed. In namespace "ci" the ServiceAccount "deployer" may create ConfigMaps in namespace "staging". 1. In "ci" create a Task "make-version" with a result "version". Its step (image docker.io/library/busybox:1.37) writes 1.4.2 into that result, without a trailing newline. 2. In "ci" create a Task "publish" with a string param "version". Its step runs the image registry.k8s.io/kubectl:v1.35.0 (it has no shell) and creates the ConfigMap "release" in "staging" with the key "version" set to the param. 3. Create a Pipeline "release" in "ci" with two tasks, "version" (Task make-version) and "publish" (Task publish), where "publish" receives the result of "version" as its param. 4. Run it once as the PipelineRun "release-run-1" under the ServiceAccount "deployer". It must succeed.

Requirements and details

Certification
CNPE · Certified Cloud Native Platform Engineer
Domain
GitOps and Continuous Delivery
Difficulty
Hard
Cluster topology
Single node
Cluster features
None beyond the base cluster
Recommended time
18 minutes
Points
9
Grader checks
6
Kubernetes version
1.35
Minimum CLI version
0.1.0
Scenario version
1
Published

Grading runs locally: 6 state checks read your cluster when you submit; the scenario passes when every check passes. Hints, the reference solution and the check definitions are available only inside the CLI, not on this page.

CNPEGitOps and Continuous DeliveryMedium

GitOps with Argo CD: an automated Application from the platform repo

The shop manifests live in the in-cluster Git server. Deliver them with an Argo CD Application that creates its namespace, prunes and heals drift.

Single node · ~15 min · 10 points

  • argocd
  • gitops
  • application
  • self-heal
  • gitea
  • continuous-delivery

goldenkube start cnpe-git-001

CNPEGitOps and Continuous DeliveryHard

GitOps with Flux: reconcile infra from Git and fix the broken manifest

The infra repository should be reconciled by Flux, but one manifest in it does not apply. Wire up the GitRepository and Kustomization, then fix the repository so the reconciliation turns Ready.

Single node · ~18 min · 10 points

  • flux
  • gitops
  • kustomization
  • gitrepository
  • gitea
  • continuous-delivery

goldenkube start cnpe-git-002

CNPEGitOps and Continuous DeliveryHard

Progressive delivery: an Argo Rollouts canary with a manual gate

Replace the storefront Deployment with an Argo Rollout that sends 20% of the pods to a new version, waits for a human, then completes; ship podinfo 6.17.0 through it.

Single node · ~18 min · 9 points

  • argo-rollouts
  • canary
  • progressive-delivery
  • rollout
  • continuous-delivery

goldenkube start cnpe-git-003

CNPEGitOps and Continuous DeliveryMedium

Progressive delivery: blue/green with a preview service and manual promotion

Run checkout as an Argo Rollout with a blue/green strategy, verify the new version on the preview Service, then switch the active Service by promoting.

Single node · ~15 min · 8 points

  • argo-rollouts
  • blue-green
  • progressive-delivery
  • preview
  • continuous-delivery

goldenkube start cnpe-git-005

Independent community project, not affiliated with or endorsed by CNCF or The Linux Foundation. Lab results are practice feedback, not an exam score.