Skip to content

Commit 39ee3a5

Browse files
committed
fix(ci): improve snap release-canary tests
Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
1 parent 0fc8144 commit 39ee3a5

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

‎.github/workflows/release-canary.yml‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,20 @@ jobs:
6767
6868
- name: Ensure Docker
6969
run: |
70+
set -euo pipefail
7071
if ! command -v docker >/dev/null 2>&1; then
7172
sudo apt-get update
7273
sudo apt-get install -y docker.io
7374
fi
7475
sudo systemctl start docker || sudo service docker start
7576
mkdir -p "${HOME}/.config/openshell"
76-
printf 'OPENSHELL_DRIVERS=docker\n' > "${HOME}/.config/openshell/gateway.env"
77+
printf 'OPENSHELL_COMPUTE_DRIVER=docker\nOPENSHELL_TELEMETRY_ENABLED=%s\n' \
78+
"$OPENSHELL_TELEMETRY_ENABLED" > "${HOME}/.config/openshell/gateway.env"
7779
docker info
7880
7981
- name: Install and check status
8082
run: |
83+
set -euo pipefail
8184
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${{ github.event.workflow_run.head_sha || github.sha }}/install.sh | sh
8285
dpkg -l openshell | grep '^ii'
8386
openshell --version
@@ -107,6 +110,13 @@ jobs:
107110
run: |
108111
set -euo pipefail
109112
sudo snap install docker
113+
for _ in $(seq 1 90); do
114+
if docker info >/dev/null 2>&1; then
115+
exit 0
116+
fi
117+
sleep 1
118+
done
119+
docker info
110120
111121
- name: Download snap from release-dev artifacts
112122
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
@@ -198,8 +208,11 @@ jobs:
198208
- name: Install and check status
199209
run: |
200210
set -euo pipefail
211+
sudo systemctl set-environment \
212+
"OPENSHELL_TELEMETRY_ENABLED=${OPENSHELL_TELEMETRY_ENABLED}"
201213
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${{ github.event.workflow_run.head_sha || github.sha }}/install.sh | sh
202214
snap list openshell
215+
snap info openshell | grep -E '^tracking: +latest/edge$'
203216
if snap list docker >/dev/null 2>&1; then
204217
echo "install.sh unexpectedly installed the docker snap" >&2
205218
exit 1
@@ -244,9 +257,12 @@ jobs:
244257
- name: Install and check status
245258
run: |
246259
set -euo pipefail
260+
sudo systemctl set-environment \
261+
"OPENSHELL_TELEMETRY_ENABLED=${OPENSHELL_TELEMETRY_ENABLED}"
247262
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${{ github.event.workflow_run.head_sha || github.sha }}/install.sh | sh
248263
snap list docker
249264
snap list openshell
265+
snap info openshell | grep -E '^tracking: +latest/edge$'
250266
docker info
251267
snap connections openshell | grep -E '^docker +openshell:docker +:docker +'
252268
openshell --version
@@ -428,6 +444,8 @@ jobs:
428444
- name: Install OpenShell CLI
429445
run: |
430446
set -euo pipefail
447+
sudo systemctl set-environment \
448+
"OPENSHELL_TELEMETRY_ENABLED=${OPENSHELL_TELEMETRY_ENABLED}"
431449
mkdir -p "${HOME}/.config/openshell"
432450
printf 'OPENSHELL_COMPUTE_DRIVER=docker\n' > "${HOME}/.config/openshell/gateway.env"
433451
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/${{ github.event.workflow_run.head_sha || github.sha }}/install.sh | sh

0 commit comments

Comments
 (0)