Skip to content

Commit

Permalink
fix(self-update): remove updater container after collecting logs
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenmiller committed Dec 4, 2024
1 parent 27a62da commit 9680a96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 9680a96

Please sign in to comment.