From 6ae0dc5fdec5b63bc1666a4dc41f931f1b270d3a Mon Sep 17 00:00:00 2001 From: Dileep Ranganathan Date: Mon, 26 Aug 2019 13:17:55 -0700 Subject: Collectd-Operator build script and Readme Added build image script for offline build and CI. Added readme instructions on how to build, deploy and use collectd-operator. Issue-ID: ONAPARC-461 Signed-off-by: Dileep Ranganathan Change-Id: Ifd1b9dc22bdf6005125931527c052727ee11a323 --- .../collectd-operator/build/build_image.sh | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 vnfs/DAaaS/microservices/collectd-operator/build/build_image.sh (limited to 'vnfs/DAaaS/microservices/collectd-operator/build/build_image.sh') diff --git a/vnfs/DAaaS/microservices/collectd-operator/build/build_image.sh b/vnfs/DAaaS/microservices/collectd-operator/build/build_image.sh new file mode 100755 index 00000000..9cda67d1 --- /dev/null +++ b/vnfs/DAaaS/microservices/collectd-operator/build/build_image.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -e +set -x + +sudo rm -rf /usr/local/go +sudo apt-get install make mercurial +wget https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz +sudo tar -xvf go1.12.9.linux-amd64.tar.gz +sudo mv go /usr/local +export GOROOT=/usr/local/go +export PATH=$PATH:/usr/local/go/bin +export GO111MODULE=on + +RELEASE_VERSION=v0.9.0 +curl -OJL https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu + +chmod +x operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu && sudo cp operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/operator-sdk && rm operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu +IMAGE_NAME=$1 +if [ -z "$IMAGE_NAME" ] +then + echo "Building Collectd-Operator image with default image name" + make +else + echo "Building Collectd-Operator image $IMAGE_NAME" + make IMAGE_NAME=$IMAGE_NAME +fi +rm -rf go1.12.9.linux-amd64.tar.gz -- cgit 1.2.3-korg