Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: (TESTS) Disable telemetry for all chectl commands #606

Merged
merged 3 commits into from
Jan 5, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .github/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ waitWorkspaceStart() {
export x=0
while [ $x -le 180 ]
do
chectl auth:login -u admin -p admin --chenamespace=${NAMESPACE}
chectl workspace:list --chenamespace=${NAMESPACE}
workspaceList=$(chectl workspace:list --chenamespace=${NAMESPACE})
chectl auth:login -u admin -p admin --telemetry=off --chenamespace=${NAMESPACE}
chectl workspace:list --telemetry=off --chenamespace=${NAMESPACE}
workspaceList=$(chectl workspace:list --telemetry=off --chenamespace=${NAMESPACE})
workspaceStatus=$(echo "$workspaceList" | grep RUNNING | awk '{ print $4} ')

if [ "${workspaceStatus:-NOT_RUNNING}" == "RUNNING" ]
Expand Down Expand Up @@ -126,7 +126,7 @@ installYq() {
# Graps Eclipse Che logs
collectCheLogWithChectl() {
mkdir -p ${ARTIFACTS_DIR}
chectl server:logs --chenamespace=${NAMESPACE} --directory=${ARTIFACTS_DIR}
chectl server:logs telemetry=off --chenamespace=${NAMESPACE} --directory=${ARTIFACTS_DIR}
flacatus marked this conversation as resolved.
Show resolved Hide resolved
}

# Build latest operator image
Expand Down Expand Up @@ -157,6 +157,7 @@ deployEclipseChe() {
chectl server:deploy \
--platform=${platform} \
--installer ${installer} \
--telemetry=off \
--chenamespace ${NAMESPACE} \
--che-operator-image ${image} \
--skip-kubernetes-health-check \
Expand Down Expand Up @@ -193,34 +194,34 @@ updateEclipseChe() {
local image=$1
local templates=$2

chectl server:update --chenamespace=${NAMESPACE} -y --che-operator-image=${image} --templates=${templates}
chectl server:update --telemetry=off --chenamespace=${NAMESPACE} -y --che-operator-image=${image} --templates=${templates}
}

startNewWorkspace() {
# Create and start a workspace
sleep 5s
chectl auth:login -u admin -p admin --chenamespace=${NAMESPACE}
chectl workspace:create --start --chenamespace=${NAMESPACE} --devfile=$OPERATOR_REPO/.ci/devfile-test.yaml
chectl workspace:create --start --telemetry=off --chenamespace=${NAMESPACE} --devfile=$OPERATOR_REPO/.ci/devfile-test.yaml
}

createWorkspace() {
sleep 5s
chectl auth:login -u admin -p admin --chenamespace=${NAMESPACE}
chectl workspace:create --chenamespace=${NAMESPACE} --devfile=${OPERATOR_REPO}/.ci/devfile-test.yaml
chectl workspace:create --telemetry=off --chenamespace=${NAMESPACE} --devfile=${OPERATOR_REPO}/.ci/devfile-test.yaml
}

startExistedWorkspace() {
sleep 5s
chectl auth:login -u admin -p admin --chenamespace=${NAMESPACE}
chectl workspace:list --chenamespace=${NAMESPACE}
workspaceList=$(chectl workspace:list --chenamespace=${NAMESPACE})
chectl auth:login -u admin -p admin --telemetry=off --chenamespace=${NAMESPACE}
chectl workspace:list --telemetry=off --chenamespace=${NAMESPACE}
workspaceList=$(chectl workspace:list --telemetry=off --chenamespace=${NAMESPACE})

# Grep applied to MacOS
workspaceID=$(echo "$workspaceList" | grep workspace | awk '{ print $1} ')
workspaceID="${workspaceID%'ID'}"
echo "[INFO] Workspace id of created workspace is: ${workspaceID}"

chectl workspace:start $workspaceID
chectl workspace:start $workspaceID --telemetry=off
}

disableOpenShiftOAuth() {
Expand Down