diff options
Diffstat (limited to 'certServiceK8sExternalProvider/Makefile')
-rw-r--r-- | certServiceK8sExternalProvider/Makefile | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/certServiceK8sExternalProvider/Makefile b/certServiceK8sExternalProvider/Makefile index ac353934..b8f5f6fc 100644 --- a/certServiceK8sExternalProvider/Makefile +++ b/certServiceK8sExternalProvider/Makefile @@ -17,16 +17,32 @@ # ============LICENSE_END========================================================= # +ip_addr=$(shell hostname -I | awk '{print $$1}') +cmpv2_issuer_pod_id=$(shell kubectl -n onap get po | grep cmpv2issuer | awk '{print $$1}') build: - go build -v -o bin/oom-certservice-k8s-external-provider + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -v -o bin/oom-certservice-cmpv2issuer test: build go test ./... build-docker-image: - docker build -t onap/oom-certservice-k8s-external-provider . + docker build -t onap/oom-certservice-cmpv2issuer:latest . run-docker-image: - docker run -it onap/oom-certservice-k8s-external-provider + docker run -it onap/oom-certservice-cmpv2issuer:latest +dev-copy-certs: + mkdir -p dev/certs + cp ../certs/cmpv2Issuer-cert.pem dev/certs/cmpv2Issuer-cert.pem + cp ../certs/cmpv2Issuer-key.pem dev/certs/cmpv2Issuer-key.pem + cp ../certs/cacert.pem dev/certs/cacert.pem + +dev-build-docker-image: build dev-copy-certs + docker build -t onap-dev/cmpv2issuer:latest . -f dev/Dockerfile.dev + +dev-run-docker-image: + docker run -it onap-dev/cmpv2issuer:latest + +dev-update-docker-hosts-file: + kubectl exec -it -n onap ${cmpv2_issuer_pod_id} -c kube-rbac-proxy -- sh -c "echo '$(ip_addr) oom-cert-service' >> /etc/hosts" |