Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The installation procedure for adding a Canary Deployment Jenkins job includes the following steps:

  1. Add a new Item as a copy from the CD Jenkins job.

  2. Rename the parameter Build selector for Copy Artifact to BuildFromCDPipeline.

  3. Add these parameters:
    1. A String Parameter named ProductionWeight.
    2. A Build selector for Copy Artifact named BuildFromCIPipeline.
    3. A Boolean named FINALIZE.

  4. In the build section:
    1. Change the Project name under the Copy artifacts from another project build step to point to CD.
    2. Change the command under the build step Execute shell to this:

      Code Block
      #!/bin/bash
      echo Switch context to $ClusterContext
      kubectl config use-context $ClusterContext
      set -x
      rm -rf Helm
      tar -xvf Helm.tar
      if [[ $FINALIZE == "true" ]]; then
      	#Usage ./canaryDeploy.sh -p <Prod Weight> -f -h <Helm chart dir> -g <Git Helmchart dir> -m <commit message> -n <namespace>
      	Scripts/canaryDeploy.sh -f -h Helm -g <Change to your Git Helmchart dir> -m <Change to your commit message> -n $Namespace
      else
      	Scripts/canaryDeploy.sh -p $ProductionWeight -h Helm -n $Namespace
      fi
      
      


  5. Apply your changes.

  6. When selecting Build with Parameters it should now look like this (the picture contains example field values):

    Image Modified