github.com/jmccormick2001/sdk-scorecard@v0.8.2/hack/image/build-ansible-image.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -eux
     4  
     5  source hack/lib/test_lib.sh
     6  
     7  ROOTDIR="$(pwd)"
     8  GOTMP="$(mktemp -d -p $GOPATH/src)"
     9  trap_add 'rm -rf $GOTMP' EXIT
    10  BASEIMAGEDIR="$GOTMP/ansible-operator"
    11  mkdir -p "$BASEIMAGEDIR"
    12  
    13  # build operator binary and base image
    14  pushd "$BASEIMAGEDIR"
    15  go run "$ROOTDIR/hack/image/ansible/scaffold-ansible-image.go"
    16  
    17  mkdir -p build/_output/bin/
    18  cp $ROOTDIR/build/operator-sdk-dev-x86_64-linux-gnu build/_output/bin/ansible-operator
    19  operator-sdk build $1
    20  popd