diff --git a/.circleci/config.yml b/.circleci/config.yml index a139459..56ead7b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,12 +2,12 @@ version: 2 jobs: build: machine: - image: ubuntu-1604:202004-01 + image: ubuntu-2004:202201-02 environment: - K8S_VERSION: v1.18.2 + K8S_VERSION: 1.21.14 KUBECONFIG: /home/circleci/.kube/config - MINIKUBE_VERSION: v1.9.2 + MINIKUBE_VERSION: v1.26.1 MINIKUBE_WANTUPDATENOTIFICATION: false MINIKUBE_WANTREPORTERRORPROMPT: false MINIKUBE_HOME: /home/circleci @@ -18,7 +18,7 @@ jobs: - run: name: Setup Helm command: | - curl -Lo helm.tar.gz https://get.helm.sh/helm-v3.0.0-linux-amd64.tar.gz + curl -Lo helm.tar.gz https://get.helm.sh/helm-v3.8.2-linux-amd64.tar.gz tar zxf helm.tar.gz chmod +x linux-amd64/helm sudo mv linux-amd64/helm /usr/local/bin/ @@ -34,7 +34,7 @@ jobs: - run: name: Setup kubectl command: | - curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl + curl -Lo kubectl https://dl.k8s.io/v${K8S_VERSION}/bin/linux/amd64/kubectl chmod +x kubectl sudo mv kubectl /usr/local/bin/ mkdir -p ${HOME}/.kube @@ -55,6 +55,6 @@ jobs: echo ${STARDOG_LICENSE} | base64 --decode > ${HOME}/stardog-license-key.bin - run: name: Helm smoke tests - no_output_timeout: 15m + no_output_timeout: 16m command: | ./tests/smoke.sh diff --git a/tests/smoke.sh b/tests/smoke.sh index 086b8ab..eee1bbd 100755 --- a/tests/smoke.sh +++ b/tests/smoke.sh @@ -21,7 +21,7 @@ function dependency_checks() { function minikube_start_tunnel() { pushd ~ echo "Starting minikube tunnel" - echo "sudo minikube tunnel" > ~/start-minikube-tunnel.sh + echo "sudo -E minikube tunnel" > ~/start-minikube-tunnel.sh chmod u+x ~/start-minikube-tunnel.sh nohup ~/start-minikube-tunnel.sh > ~/minikube_tunnel.log 2> ~/minikube_tunnel.err < /dev/null & echo "Minikube tunnel started in the background" @@ -60,7 +60,8 @@ function helm_install_stardog_cluster_with_zookeeper() { --timeout 15m0s \ -f ./tests/minikube.yaml \ --set "replicaCount=${NUM_STARDOGS}" \ - --set "zookeeper.replicaCount=${NUM_ZKS}" + --set "zookeeper.replicaCount=${NUM_ZKS}" \ + --debug rc=$? if [ ${rc} -ne 0 ]; then @@ -69,6 +70,16 @@ function helm_install_stardog_cluster_with_zookeeper() { kubectl -n ${NAMESPACE} get pods echo "Listing services" kubectl -n ${NAMESPACE} get svc + echo "Logs:" + kubectl logs -n ${NAMESPACE} stardog-helm-tests-stardog-0 + echo "Previous logs:" + kubectl logs -n ${NAMESPACE} stardog-helm-tests-stardog-0 --previous + echo "Describe pod:" + kubectl describe pod stardog-helm-tests-stardog-0 -n ${NAMESPACE} + echo "Get jobs:" + kubectl get jobs -n ${NAMESPACE} + echo "helm list --all:" + helm list --all -n ${NAMESPACE} exit ${rc} fi @@ -166,6 +177,10 @@ function create_and_drop_db() { rc=$? if [ ${rc} -ne 0 ]; then echo "Failed to create Stardog db on ${STARDOG_IP}, exiting" + echo "Tunnel logs:" + cat ~/minikube_tunnel.log + echo "Tunnel error logs:" + cat ~/minikube_tunnel.err exit ${rc} fi echo "Successfully created database."