From 9377aa7c3842dc4cf4b71e6009351df76d44beaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20S=C3=A9guillon?= Date: Sun, 31 Jan 2021 21:18:01 +0100 Subject: [PATCH] remove unecessary sudos --- .github/workflows/ci.yml | 76 ++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4434c3..493bb55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: - name: Create single node Cluster run: | - cat <&1 > /tmp/kail.log || true & + kail -n default 2>&1 > /tmp/kail.log || true & # Infinite script waits for new VMs up and fetch logs from console ( while true; do - until sudo kubectl wait --for=condition=Ready pod -l kubevirt.io=virt-launcher --namespace default; + until kubectl wait --for=condition=Ready pod -l kubevirt.io=virt-launcher --namespace default; do echo "Still Waiting Pod to start..."; sleep 5; done LOGFILE="virtcl-console-$(date '+%Y-%m-%d-%H-%M-%S').log" echo "Starting virtctl console" >> /tmp/${LOGFILE} - sudo script -e -c "virtctl console instance" >> /tmp/${LOGFILE} + script -e -c "virtctl console instance" >> /tmp/${LOGFILE} done ) & # Event router reports any event as log, a great help for troubleshooting since Kind exports all running Pods logs - sudo kubectl create -f https://raw.githubusercontent.com/heptiolabs/eventrouter/master/yaml/eventrouter.yaml + kubectl create -f https://raw.githubusercontent.com/heptiolabs/eventrouter/master/yaml/eventrouter.yaml - name: Launch test uses: nick-invision/retry@v2 @@ -292,14 +292,14 @@ jobs: timeout_minutes: 25 max_attempts: 3 on_retry_command: | - sudo kubectl delete pods --all || true - sudo kubectl delete configmaps --all || true - sudo kubectl delete job --all || true + kubectl delete pods --all || true + kubectl delete configmaps --all || true + kubectl delete job --all || true command: | # Configmap will be waitinig untill it is deleted, telling one Pod ended the Job - sudo kubectl create configmap molecule-job-running --from-literal status=Started + kubectl create configmap molecule-job-running --from-literal status=Started # Create Job - cat < ${LOG_DIR}/dmesg.txt || true - sudo kind export logs ${LOG_DIR} || true + kind export logs ${LOG_DIR} || true sudo journalctl | cat > ${LOG_DIR}/journalctl.txt || true sudo chown -R $USER:$USER ${LOG_DIR} || true env: