Merge "Adjust conformance scripts (capd)"

This commit is contained in:
Zuul 2021-09-23 16:48:11 +00:00 committed by Gerrit Code Review
commit 75044b33b1
4 changed files with 10 additions and 14 deletions

View File

@ -14,8 +14,10 @@
set -xe set -xe
: ${SONOBUOY_VERSION:="0.18.2"} : ${SONOBUOY_VERSION:="0.51.0"}
: ${KUBECONFIG:="$HOME/.airship/kubeconfig"} : ${KUBECONFIG:="$HOME/.airship/kubeconfig"}
: ${TARGET_CLUSTER_CONTEXT:="target-cluster"}
URL="https://github.com/vmware-tanzu/sonobuoy/releases/download/v${SONOBUOY_VERSION}/sonobuoy_${SONOBUOY_VERSION}_linux_amd64.tar.gz" URL="https://github.com/vmware-tanzu/sonobuoy/releases/download/v${SONOBUOY_VERSION}/sonobuoy_${SONOBUOY_VERSION}_linux_amd64.tar.gz"
rm -rf /tmp/sonobuoy rm -rf /tmp/sonobuoy
mkdir /tmp/sonobuoy mkdir /tmp/sonobuoy
@ -23,4 +25,4 @@ sudo -E curl -sSLo "/tmp/sonobuoy/sonobuoy_${SONOBUOY_VERSION}_linux_amd64.tar.g
tar xvf /tmp/sonobuoy/sonobuoy_${SONOBUOY_VERSION}_linux_amd64.tar.gz -C /tmp/sonobuoy/ tar xvf /tmp/sonobuoy/sonobuoy_${SONOBUOY_VERSION}_linux_amd64.tar.gz -C /tmp/sonobuoy/
sudo install -m 755 -o root /tmp/sonobuoy/sonobuoy /usr/local/bin sudo install -m 755 -o root /tmp/sonobuoy/sonobuoy /usr/local/bin
echo ${KUBECONFIG} echo ${KUBECONFIG}
sonobuoy version --kubeconfig ${KUBECONFIG} sonobuoy version --kubeconfig ${KUBECONFIG} --context ${TARGET_CLUSTER_CONTEXT}

View File

@ -17,7 +17,6 @@ set -xe
# Available Modes: quick, certified-conformance, non-disruptive-conformance. # Available Modes: quick, certified-conformance, non-disruptive-conformance.
# (default quick) # (default quick)
: ${CONFORMANCE_MODE:="quick"} : ${CONFORMANCE_MODE:="quick"}
: ${KUBE_CONFORMANCE_IMAGE_VERSION:="v1.18.6"}
: ${TIMEOUT:=10800} : ${TIMEOUT:=10800}
: ${TARGET_CLUSTER_CONTEXT:="target-cluster"} : ${TARGET_CLUSTER_CONTEXT:="target-cluster"}
@ -27,7 +26,6 @@ cd /tmp/sonobuoy_snapshots/e2e
# Run aggregator, and default plugins e2e and systemd-logs # Run aggregator, and default plugins e2e and systemd-logs
sonobuoy run --plugin e2e --plugin systemd-logs -m ${CONFORMANCE_MODE} \ sonobuoy run --plugin e2e --plugin systemd-logs -m ${CONFORMANCE_MODE} \
--context "$TARGET_CLUSTER_CONTEXT" \ --context "$TARGET_CLUSTER_CONTEXT" \
--kube-conformance-image gcr.io/google-containers/conformance:${KUBE_CONFORMANCE_IMAGE_VERSION} \
--kubeconfig ${KUBECONFIG} \ --kubeconfig ${KUBECONFIG} \
--wait --timeout ${TIMEOUT} \ --wait --timeout ${TIMEOUT} \
--log_dir /tmp/sonobuoy_snapshots/e2e --log_dir /tmp/sonobuoy_snapshots/e2e
@ -39,7 +37,7 @@ kubectl get all -n sonobuoy --kubeconfig ${KUBECONFIG} --context "$TARGET_CLUSTE
sonobuoy status --kubeconfig ${KUBECONFIG} --context "$TARGET_CLUSTER_CONTEXT" sonobuoy status --kubeconfig ${KUBECONFIG} --context "$TARGET_CLUSTER_CONTEXT"
# Get logs # Get logs
sonobuoy logs sonobuoy logs --kubeconfig ${KUBECONFIG} --context "$TARGET_CLUSTER_CONTEXT"
# Store Results # Store Results
results=$(sonobuoy retrieve --kubeconfig ${KUBECONFIG} --context $TARGET_CLUSTER_CONTEXT) results=$(sonobuoy retrieve --kubeconfig ${KUBECONFIG} --context $TARGET_CLUSTER_CONTEXT)

View File

@ -17,8 +17,6 @@ set -xe
: ${KUBEBENCH_MASTER_PLUGIN:="https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-master-plugin.yaml"} : ${KUBEBENCH_MASTER_PLUGIN:="https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-master-plugin.yaml"}
: ${KUBEBENCH_WORKER_PLUGIN:="https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-plugin.yaml"} : ${KUBEBENCH_WORKER_PLUGIN:="https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-plugin.yaml"}
: ${TARGET_CLUSTER_CONTEXT:="target-cluster"} : ${TARGET_CLUSTER_CONTEXT:="target-cluster"}
# This shouldnot include minor version
: ${KUBEBENCH_K8S_VERSION:=1.18}
: ${TIMEOUT:=300} : ${TIMEOUT:=300}
mkdir -p /tmp/sonobuoy_snapshots/kubebench mkdir -p /tmp/sonobuoy_snapshots/kubebench
@ -30,8 +28,6 @@ sonobuoy run \
--context ${TARGET_CLUSTER_CONTEXT} \ --context ${TARGET_CLUSTER_CONTEXT} \
--plugin ${KUBEBENCH_MASTER_PLUGIN} \ --plugin ${KUBEBENCH_MASTER_PLUGIN} \
--plugin ${KUBEBENCH_WORKER_PLUGIN} \ --plugin ${KUBEBENCH_WORKER_PLUGIN} \
--plugin-env kube-bench-master.KUBERNETES_VERSION=${KUBEBENCH_K8S_VERSION} \
--plugin-env kube-bench-master.KUBERNETES_VERSION=${KUBEBENCH_K8S_VERSION} \
--wait --timeout ${TIMEOUT} \ --wait --timeout ${TIMEOUT} \
--log_dir /tmp/sonobuoy_snapshots/kubebench --log_dir /tmp/sonobuoy_snapshots/kubebench
@ -42,7 +38,7 @@ kubectl get all -n sonobuoy --kubeconfig ${KUBECONFIG} --context ${TARGET_CLUSTE
sonobuoy status --kubeconfig ${KUBECONFIG} --context ${TARGET_CLUSTER_CONTEXT} sonobuoy status --kubeconfig ${KUBECONFIG} --context ${TARGET_CLUSTER_CONTEXT}
# Get logs # Get logs
sonobuoy logs sonobuoy logs --kubeconfig ${KUBECONFIG} --context ${TARGET_CLUSTER_CONTEXT}
# Store Results # Store Results
results=$(sonobuoy retrieve --kubeconfig ${KUBECONFIG} --context ${TARGET_CLUSTER_CONTEXT}) results=$(sonobuoy retrieve --kubeconfig ${KUBECONFIG} --context ${TARGET_CLUSTER_CONTEXT})

View File

@ -241,8 +241,8 @@
site_name: docker-test-site site_name: docker-test-site
gate_scripts: gate_scripts:
- *docker_gate_scripts - *docker_gate_scripts
- KUBECONFIG=/tmp/target-cluster.kubeconfig TARGET_CLUSTER_CONTEXT=target-cluster ./tools/deployment/sonobuoy/01-install_sonobuoy.sh - ./tools/deployment/sonobuoy/01-install_sonobuoy.sh
- KUBECONFIG=/tmp/target-cluster.kubeconfig TARGET_CLUSTER_CONTEXT=target-cluster ./tools/deployment/sonobuoy/03-kubebench.sh - ./tools/deployment/sonobuoy/03-kubebench.sh
voting: false voting: false
- job: - job:
name: airship-airshipctl-docker-cncf-conformance name: airship-airshipctl-docker-cncf-conformance
@ -269,8 +269,8 @@
site_name: docker-test-site site_name: docker-test-site
gate_scripts: gate_scripts:
- *docker_gate_scripts - *docker_gate_scripts
- KUBECONFIG=/tmp/target-cluster.kubeconfig TARGET_CLUSTER_CONTEXT=target-cluster ./tools/deployment/sonobuoy/01-install_sonobuoy.sh - ./tools/deployment/sonobuoy/01-install_sonobuoy.sh
- KUBECONFIG=/tmp/target-cluster.kubeconfig TARGET_CLUSTER_CONTEXT=target-cluster CONFORMANCE_MODE=certified-conformance ./tools/deployment/sonobuoy/02-run_default.sh - CONFORMANCE_MODE=certified-conformance ./tools/deployment/sonobuoy/02-run_default.sh
voting: false voting: false
- job: - job:
name: airship-airshipctl-publish-image name: airship-airshipctl-publish-image