github.com/argoproj/argo-cd/v3@v3.2.1/cmd/argocd/commands/testdata/argocd-test-plugin (about)

     1  #!/bin/bash
     2  
     3  # Ensure we receive the expected flags and values
     4  while [[ "$#" -gt 0 ]]; do
     5      case $1 in
     6          --flag1) FLAG1="$2"; shift ;;
     7          --flag2) FLAG2="$2"; shift ;;
     8          --help) echo "Usage: argocd test-plugin --flag1 value1 --flag2 value2"; exit 0 ;;
     9          *) echo "Unknown argument: $1"; exit 1 ;;
    10      esac
    11      shift
    12  done
    13  
    14  # Output the parsed flag values
    15  echo "Flag1: ${FLAG1}"
    16  echo "Flag2: ${FLAG2}"