Skip to content

ci(Taskfile): add a command to test autoupdate #1033

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

Merged
merged 4 commits into from
May 15, 2025
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
Prev Previous commit
Next Next commit
fix: update autoupdate demo description and improve server wait logic
  • Loading branch information
dido18 committed May 15, 2025
commit 84b93885ac2fb2ecb2ec721a1bfed7b155f70e36
9 changes: 2 additions & 7 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ tasks:
- task: go:lint

autoupdate:demo:
desc: Demo the local auto-update workflow for the Agent
desc: Demo the local auto-update workflow for the Agent (for linux and mac user)
prompt: Before continuing, please make sure you’ve opened the "Open Configuration" option from the Agent menu and set the updateUrl=http://127.0.0.1:3000/
cmds:
- task: go:build
Expand All @@ -159,12 +159,7 @@ tasks:
- go-selfupdate -o public/CreateAgent/Stable ./arduino-cloud-agent {{.VERSION}}
- docker rm -f agent-static-server
- docker run --rm -d -v "$PWD/public:/usr/share/nginx/html:ro" -p 3000:80 --name agent-static-server nginx:alpine
- |
echo "Waiting for http://127.0.0.1:3000 to become available..."
until nc -z 127.0.0.1 3000; do
sleep 1
done
echo "Server is up!"
- sleep 5 # wait the server is up before starting the update
- curl -X POST http://127.0.0.1:8991/update


Expand Down
Loading