github.com/jmrodri/operator-sdk@v0.5.0/hack/tests/scorecard-subcommand.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  DEST_IMAGE="quay.io/example/scorecard-proxy"
     4  CONFIG_PATH=".test-osdk-scorecard.yaml"
     5  
     6  set -ex
     7  
     8  # build scorecard-proxy image (and delete intermediate builder image)
     9  ./hack/image/build-scorecard-proxy-image.sh "$DEST_IMAGE"
    10  
    11  # the test framework directory has all the manifests needed to run the cluster
    12  pushd test/test-framework
    13  commandoutput="$(operator-sdk scorecard \
    14    --cr-manifest deploy/crds/cache_v1alpha1_memcached_cr.yaml \
    15    --init-timeout 60 \
    16    --csv-path deploy/memcachedoperator.0.0.2.csv.yaml \
    17    --verbose \
    18    --proxy-image "$DEST_IMAGE" \
    19    --proxy-pull-policy Never \
    20    2>&1)"
    21  echo $commandoutput | grep "Total Score: 6/8 points"
    22  
    23  # test config file
    24  commandoutput2="$(operator-sdk scorecard \
    25    --proxy-image "$DEST_IMAGE" \
    26    --config "$CONFIG_PATH")"
    27  echo $commandoutput2 | grep "Total Score: 6/8 points"
    28  popd