Generate version.txt in conformance-k8s
@@ -15,17 +15,47 @@ fi
test_report_dir="${ARTIFACT_DIR}"
mkdir -p "${test_report_dir}"
+cat <<END > "${test_report_dir}/README.md"
+This conformance report is generated by the OpenShift CI infrastructure. The canonical source location for this test script is located at https://github.com/openshift/origin/blob/master/test/extended/conformance-k8s.sh
+
+This file was generated by:
+
+ Commit $( git rev-parse HEAD || "<commit>" )
+ Tag $( git describe || "<tag>" )
+
+To recreate these results
+
+1. Install an [OpenShift cluster](https://docs.openshift.com/container-platform/latest/install_config/install/advanced_install.html)
+2. Retrieve a \`.kubeconfig\` file with administrator credentials on that cluster and set the environment variable KUBECONFIG
+
+ export KUBECONFIG=PATH_TO_KUBECONFIG
+
+3. Clone the OpenShift source repository and change to that directory:
+
+ git clone https://github.com/openshift/origin.git
+ cd origin
+
+4. Place the \`oc\` binary for that cluster in your PATH
+5. Run the conformance test:
+
+ test/extended/conformance-k8s.sh
+
+Nightly conformance tests are run against release branches and reported https://openshift-gce-devel.appspot.com/builds/origin-ci-test/logs/test_branch_origin_extended_conformance_k8s/
+END
+
version="${KUBERNETES_VERSION:-release-1.8}"
-kubernetes="${KUBERNETES_ROOT:-${OS_ROOT}/../../../k8s.io/kubernetes2}"
+kubernetes="${KUBERNETES_ROOT:-${OS_ROOT}/../../../k8s.io/kubernetes}"
if [[ ! -d "${kubernetes}" ]]; then
if [[ -n "${KUBERNETES_ROOT-}" ]]; then
os::log::fatal "Cannot find Kubernetes source directory, set KUBERNETES_ROOT"
fi
kubernetes="${OS_ROOT}/_output/components/kubernetes"
+ if [[ ! -d "${kubernetes}" ]]; then
mkdir -p "$( dirname "${kubernetes}" )"
os::log::info "Cloning Kubernetes source"
git clone "https://github.com/kubernetes/kubernetes.git" -b "${version}" "${kubernetes}" # --depth=1 unfortunately we need history info as well
fi
+fi
os::log::info "Running Kubernetes conformance suite for ${version}"
@@ -45,10 +75,16 @@ git checkout "${version}"
make WHAT=cmd/kubectl
make WHAT=test/e2e/e2e.test
export PATH="${kubernetes}/_output/local/bin/$( os::build::host_platform ):${PATH}"
-kubectl version
+
+kubectl version > "${test_report_dir}/version.txt"
+echo "-----" >> "${test_report_dir}/version.txt"
+oc version >> "${test_report_dir}/version.txt"
# Run the test
e2e.test '-ginkgo.focus=\[Conformance\]' \
-report-dir "${test_report_dir}" -ginkgo.noColor \
-allowed-not-ready-nodes ${unschedulable} \
2>&1 | tee "${test_report_dir}/e2e.log"
+
+echo
+echo "Run complete, results in ${test_report_dir}"
\ No newline at end of file
