From 3f7e8d63cc9fa230e147dcdbf3738a8c9aa44f51 Mon Sep 17 00:00:00 2001 From: flacatus Date: Tue, 4 Aug 2020 10:25:59 +0200 Subject: [PATCH] Create Eclipse nightly deployment in minishift Signed-off-by: flacatus --- .ci/cico_minishift_nightly.sh | 84 +++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 .ci/cico_minishift_nightly.sh diff --git a/.ci/cico_minishift_nightly.sh b/.ci/cico_minishift_nightly.sh new file mode 100644 index 0000000000..902cdf2e00 --- /dev/null +++ b/.ci/cico_minishift_nightly.sh @@ -0,0 +1,84 @@ +#!/bin/bash +# +# Copyright (c) 2020 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + +set -ex + +init() { + export SCRIPT=$(readlink -f "$0") + export SCRIPT_DIR=$(dirname "$SCRIPT") + export RAM_MEMORY=8192 + export NAMESPACE="che" + export PLATFORM="openshift" + + if [[ ${WORKSPACE} ]] && [[ -d ${WORKSPACE} ]]; then + OPERATOR_REPO=${WORKSPACE}; + else + OPERATOR_REPO=$(dirname "$SCRIPT_DIR"); + fi + +} + +installDependencies() { + install_VirtPackages + installStartDocker + start_libvirt + setup_kvm_machine_driver + minishift_installation + installChectl + load_jenkins_vars +} + +self_signed_minishift() { + export DOMAIN=*.$(minishift ip).nip.io + + source ${OPERATOR_REPO}/.ci/util/che-cert-generation.sh + + #Configure Router with generated certificate: + oc login -u system:admin --insecure-skip-tls-verify=true + oc project default + oc delete secret router-certs + + cat domain.crt domain.key > minishift.crt + oc create secret tls router-certs --key=domain.key --cert=minishift.crt + oc rollout latest router + + oc create namespace che + + cp rootCA.crt ca.crt + oc create secret generic self-signed-certificate --from-file=ca.crt -n=che +} + +run() { + cat >/tmp/che-cr-patch.yaml <