Skip to content
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

fix(self-update): remove updater container after collecting logs #53

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion files/tedge/self_update.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on_success = "collect-logs"
on_error = "collect-logs"

[collect-logs]
script = "sh -c 'sudo -E tedge-container tools container-logs ${.payload.containerName}-updater && sudo -E tedge-container tools container-remove ${.payload.containerName}-updater'"
script = "sh -c 'sudo -E tedge-container tools container-logs ${.payload.containerName}-updater; sudo -E tedge-container tools container-remove ${.payload.containerName}-updater'"
on_success = "verify"
on_error = "verify"

Expand Down
3 changes: 3 additions & 0 deletions tests/main/self-update.robot
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ Self update using software update operation
Device Should Have Installed Software
... {"name": "tedge", "version": "ghcr.io/thin-edge/tedge-container-bundle:99.99.2", "softwareType": "container"}

# updater container should be removed (logs are already collected as part of the workflow)
Cumulocity.Should Have Services service_type=container name=tedge-updater min_count=0 max_count=0

Rollback when trying to install a non-tedge based image
# pre-condition
Device Should Have Installed Software
Expand Down
Loading