Skip to content

Commit

Permalink
ci: fix build test env image system-wide python package installation …
Browse files Browse the repository at this point in the history
…error

Signed-off-by: Yang Chiu <[email protected]>
  • Loading branch information
yangchiu authored and David Ko committed Dec 12, 2023
1 parent 61d6ce2 commit 3513bd2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 143 deletions.
3 changes: 1 addition & 2 deletions test_framework/Dockerfile.setup
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ RUN wget -q https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_V
wget -q "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" && \
mv yq_linux_amd64 /usr/local/bin/yq && \
chmod +x /usr/local/bin/yq && \
apk add openssl openssh-client ca-certificates git rsync bash curl jq chromium chromium-chromedriver python3 py3-pip && \
pip3 install -U selenium==3.141.0 && \
apk add openssl openssh-client ca-certificates git rsync bash curl jq && \
ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/id_rsa && \
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \
chmod 700 get_helm.sh && \
Expand Down
7 changes: 4 additions & 3 deletions test_framework/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ install_rancher() {


get_rancher_api_key() {
python3 "${TF_VAR_tf_workspace}/scripts/rancher/webdriver/main.py" "${RANCHER_HOSTNAME}" "${RANCHER_BOOTSTRAP_PASSWORD}"
RANCHER_ACCESS_KEY=`cat "${PWD}/access_key"`
RANCHER_SECRET_KEY=`cat "${PWD}/secret_key"`
TOKEN=$(curl -X POST -s -k "https://${RANCHER_HOSTNAME}/v3-public/localproviders/local?action=login" -H 'Content-Type: application/json' -d "{\"username\":\"admin\", \"password\":\"${RANCHER_BOOTSTRAP_PASSWORD}\", \"responseType\": \"json\"}" | jq -r '.token' | tr -d '"')
ARR=(${TOKEN//:/ })
RANCHER_ACCESS_KEY=${ARR[0]}
RANCHER_SECRET_KEY=${ARR[1]}
}


Expand Down
138 changes: 0 additions & 138 deletions test_framework/scripts/rancher/webdriver/main.py

This file was deleted.

0 comments on commit 3513bd2

Please sign in to comment.