github.com/minio/console@v1.4.1/web-app/tests/scripts/operator.sh (about) 1 # This file is part of MinIO Console Server 2 # Copyright (c) 2022 MinIO, Inc. 3 # # This program is free software: you can redistribute it and/or modify 4 # it under the terms of the GNU Affero General Public License as published by 5 # the Free Software Foundation, either version 3 of the License, or 6 # (at your option) any later version. 7 # # This program is distributed in the hope that it will be useful, 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # GNU Affero General Public License for more details. 11 # # You should have received a copy of the GNU Affero General Public License 12 # along with this program. If not, see <http://www.gnu.org/licenses/>. 13 14 SCRIPT_DIR=$(dirname "$0") 15 export SCRIPT_DIR 16 source "${SCRIPT_DIR}/common.sh" # This is common.sh for TestCafe Tests 17 source "${GITHUB_WORKSPACE}/tests/common.sh" # This is common.sh for k8s tests. 18 19 ## this enables :dev tag for minio/operator container image. 20 CI="true" 21 export CI 22 23 ## Make sure to install things if not present already 24 sudo curl -#L "https://dl.k8s.io/release/v1.23.1/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl 25 sudo chmod +x /usr/local/bin/kubectl 26 27 sudo curl -#L "https://dl.min.io/client/mc/release/linux-amd64/mc" -o /usr/local/bin/mc 28 sudo chmod +x /usr/local/bin/mc 29 30 __init__() { 31 export TIMESTAMP=$(date "+%s") 32 echo $TIMESTAMP >web-app/tests/constants/timestamp.txt 33 export GOPATH=/tmp/gopath 34 export PATH=${PATH}:${GOPATH}/bin 35 destroy_kind 36 setup_kind 37 install_operator 38 install_tenant 39 echo "kubectl proxy" 40 kubectl proxy & 41 echo "yarn start" 42 yarn start & 43 echo "console operator" 44 ./console operator & 45 echo "DONE with kind, yarn and console, next is testcafe" 46 exit 0 47 } 48 49 (__init__ "$@")