Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dido18 merged 4 commits intomainfromtaskfile-test-autorupdate
May 15, 2025

Conversation

dido18
Copy link
Contributor

@dido18dido18 commentedMay 15, 2025
edited
Loading

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among thePull Requests
    before creating one)
  • Tests for the changes have been added (for bug fixes / features)

What kind of change does this PR introduce?
Feature for local testing of autoupdate.

What is the current behavior?

What is the new behavior?
Add anautoupdate:demo command to test the autoupdate of the agent on local machine.

  • By default, the new version is the current commit.
  • To provide a custom version, pass theVERSION=X.Y.Z to the task command.

Usage:

╰─$ task autoupdate:demo VERSION=3.0.3Before 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/ [y/N]ytask: [go:build] go build -v  -o arduino-cloud-agent -ldflags ' -X main.version=3.0.3 -X main.commit=b8c7f9e 'github.com/arduino/arduino-create-agenttask: [autoupdate:demo] go install github.com/sanbornm/go-selfupdate/...@latesttask: [autoupdate:demo] go-selfupdate -o public/CreateAgent/Stable ./arduino-cloud-agent 3.0.3task: [autoupdate:demo] docker rm -f agent-static-serveragent-static-servertask: [autoupdate:demo] docker run --rm -d -v "$PWD/public:/usr/share/nginx/html:ro" -p 3000:80 --name agent-static-server nginx:alpineef6dfeaa9bd2b0b031c558c2f3cf4c214b9b77428bf74ad23371fb67ab92aeddtask: [autoupdate:demo] sleep 5task: [autoupdate:demo] curl -X POST http://127.0.0.1:8991/update{"success":"Please wait a moment while the agent reboots itself"}%

To check that the update process was completed correctly, click on the tray icon of the agent and check theAgent Version X.X.X

  • Does this PR introduce a breaking change?
  • Other information:

@codecov-commenter
Copy link

codecov-commenter commentedMay 15, 2025
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 20.24%. Comparing base(e7ea376) to head(e2d2c38).

Additional details and impacted files
@@           Coverage Diff           @@##             main    #1033   +/-   ##=======================================  Coverage   20.24%   20.24%           =======================================  Files          42       42             Lines        3241     3241           =======================================  Hits          656      656             Misses       2498     2498             Partials       87       87
FlagCoverage Δ
unit20.24% <ø> (ø)

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dido18dido18 requested a review froma teamMay 15, 2025 10:26
Copy link
Contributor

@alessio-peruginialessio-perugini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Just add a note that when chaning the config, we have to restart the agent otherwise the very firstrun of this task won't work, as the old agent picked up the default url

@per1234per1234 added type: enhancementProposed improvement topic: infrastructureRelated to project infrastructure labelsMay 15, 2025
@dido18dido18 merged commitb2b9887 intomainMay 15, 2025
49 checks passed
@dido18dido18 deleted the taskfile-test-autorupdate branchMay 15, 2025 13:51
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@alessio-peruginialessio-peruginialessio-perugini approved these changes

@MatteoPologrutoMatteoPologrutoMatteoPologruto approved these changes

Assignees
No one assigned
Labels
topic: infrastructureRelated to project infrastructuretype: enhancementProposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@dido18@codecov-commenter@alessio-perugini@MatteoPologruto@per1234

[8]ページ先頭

©2009-2025 Movatter.jp