Added bpa_op_unit to make file 90/1890/1
authorItohan <itohan.ukponmwan@intel.com>
Thu, 31 Oct 2019 20:14:44 +0000 (13:14 -0700)
committerItohan <itohan.ukponmwan@intel.com>
Thu, 31 Oct 2019 20:14:44 +0000 (13:14 -0700)
- Added kud image build to bpa_op_install

Signed-off-by: Itohan Ukponmwan <itohan.ukponmwan@intel.com>
Change-Id: Ie86e1a4141e4eed23e353ccedbf89c1aaf732ab5

Makefile
cmd/bpa-operator/Makefile
cmd/bpa-operator/bpa_verifier.sh
cmd/bpa-operator/go.mod
cmd/bpa-operator/go.sum

index c8695be..0a8e3be 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -51,6 +51,9 @@ bpa_op_delete:
 bpa_op_e2e:
        pushd $(BPA_OPERATOR) && make e2etest && popd
 
+bpa_op_unit:
+       pushd $(BPA_OPERATOR) && make unit_test && popd
+
 bpa_op_verifier: bpa_op_install bpa_op_e2e
 
 bpa_op_all: bm_all bpa_op_install
index fe1cf29..9363e38 100644 (file)
@@ -3,7 +3,19 @@ build:
        go build -o build/_output/bin/bpa-operator cmd/manager/main.go
 
 docker:
-       docker build -t akraino.org/icn/bpa-operator:latest . -f build/Dockerfile
+       docker build --rm -t akraino.org/icn/bpa-operator:latest . -f build/Dockerfile
+       git clone https://github.com/onap/multicloud-k8s.git
+       cd multicloud-k8s && \
+       docker build  --rm \
+               --build-arg http_proxy=${http_proxy} \
+               --build-arg HTTP_PROXY=${HTTP_PROXY} \
+               --build-arg https_proxy=${https_proxy} \
+               --build-arg HTTPS_PROXY=${HTTPS_PROXY} \
+               --build-arg no_proxy=${no_proxy} \
+               --build-arg NO_PROXY=${NO_PROXY} \
+               -t github.com/onap/multicloud-k8s:latest . -f kud/build/Dockerfile
+       rm -rf multicloud-k8s
+
 
 .PHONY: deploy
 deploy:
@@ -23,6 +35,10 @@ delete:
        kubectl delete -f deploy/crds/software-crd/bpa_v1alpha1_software_crd.yaml
        kubectl delete -f deploy/operator.yaml
 
+.PHONY: unit_test
+unit_test:
+       go test ./pkg/controller/provisioning/
+
 .PHONY: e2etest
 e2etest:
        ./bpa_verifier.sh
index 974f7b3..d0d33a3 100755 (executable)
@@ -42,20 +42,6 @@ lease ${workerIP} {
 }
 EOF
 
-# Build KUD image
-echo "Building KUD image"
-git clone https://github.com/onap/multicloud-k8s.git
-pushd multicloud-k8s
-docker build  --rm \
-         --build-arg http_proxy=${http_proxy} \
-         --build-arg HTTP_PROXY=${HTTP_PROXY} \
-         --build-arg https_proxy=${https_proxy} \
-         --build-arg HTTPS_PROXY=${HTTPS_PROXY} \
-         --build-arg no_proxy=${no_proxy} \
-         --build-arg NO_PROXY=${NO_PROXY} \
-         -t github.com/onap/multicloud-k8s:latest . -f kud/build/Dockerfile
-
-popd
 # Create ssh-key-secret required for job
 kubectl create secret generic ssh-key-secret --from-file=id_rsa=/root/.ssh/id_rsa --from-file=id_rsa.pub=/root/.ssh/id_rsa.pub
 
@@ -121,5 +107,4 @@ kubectl delete secret ssh-key-secret
 rm e2e_test_provisioning_cr.yaml
 rm -rf /multi-cluster/cluster-test
 rm /opt/icn/dhcp/dhcpd.leases
-rm -rf multicloud-k8s
 make delete
index 95c82b4..f7efc3b 100644 (file)
@@ -1,6 +1,7 @@
 module github.com/bpa-operator
 
 require (
+       github.com/NYTimes/gziphandler v1.0.1 // indirect
        github.com/operator-framework/operator-sdk v0.10.0
        github.com/spf13/pflag v1.0.3
        golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5
index 7aa1c86..79640c7 100644 (file)
@@ -85,6 +85,7 @@ github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT
 github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6/go.mod h1:qr0VowGBT4CS4Q8vFF8BSeKz34PuqKGxs/L0IAQA9DQ=
 github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
 github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+github.com/evanphx/json-patch v4.1.0+incompatible h1:K1MDoo4AZ4wU0GIU/fPmtZg7VpzLjCxu+UwBD1FvwOc=
 github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
 github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4=
 github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=