diff --git a/.circleci/config.yml b/.circleci/config.yml index 2a8211760..b09e7af0b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,14 +11,13 @@ jobs: - run: name: Create the credentials file command: sh scripts/createCredentials.sh - - run: - name: Get the kube config file - command: sh scripts/getKubeConfig.sh - run: name: Build and deploy connector command: sh scripts/envCreation.sh - run: | echo 'export AZURE_AUTH_LOCATION=${outputPathCredsfile}' >> $BASH_ENV + - run: | + echo 'export KUBECONFIG=${outputPathKubeConfigFile}' >> $BASH_ENV - run: name: Dependencies command: go get -v -t -d ./... diff --git a/scripts/createCredentials.sh b/scripts/createCredentials.sh index 2b7589037..4e412ee50 100644 --- a/scripts/createCredentials.sh +++ b/scripts/createCredentials.sh @@ -13,4 +13,27 @@ cat < ${outputPathCredsfile} "galleryEndpointUrl": "$galleryEndpointUrl", "managementEndpointUrl": "$managementEndpointUrl" } +EOF + +# This will build the kubeConfig during the CI +cat < ${outputPathKubeConfigFile} +--- +apiVersion: v1 +clusters: +- cluster: + certificate-authority-data: "$kubeConfigCertificateAuthorityData" + server: $kubeConfigServer + name: "aci-connector-k8s" +contexts: +- context: + cluster: "aci-connector-k8s" + user: "aci-connector-k8s-admin" + name: "aci-connector-k8s" +current-context: "aci-connector-k8s" +kind: Config +users: +- name: "aci-connector-k8s-admin" + user: + client-certificate-data: "$kubeConfigClientCertificateData" + client-key-data: "$kubeConfigClientKeyData" EOF \ No newline at end of file