-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3306 from reubenmiller/fix-in-progress-workflows-…
…ignored-after-self-update fix: process non-versioned in-progress commands on startup
- Loading branch information
Showing
4 changed files
with
154 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
tests/RobotFramework/tests/cumulocity/self-update/apt_package_pinning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Package: tedge-full | ||
Pin: version %%VERSION%% | ||
Pin-Priority: 1001 | ||
|
||
Package: tedge | ||
Pin: version %%VERSION%% | ||
Pin-Priority: 1001 | ||
|
||
Package: tedge-mapper | ||
Pin: version %%VERSION%% | ||
Pin-Priority: 1001 | ||
|
||
Package: tedge-agent | ||
Pin: version %%VERSION%% | ||
Pin-Priority: 1001 | ||
|
||
Package: c8y-firmware-plugin | ||
Pin: version %%VERSION%% | ||
Pin-Priority: 1001 | ||
|
||
Package: c8y-remote-access-plugin | ||
Pin: version %%VERSION%% | ||
Pin-Priority: 1001 | ||
|
||
Package: tedge-apt-plugin | ||
Pin: version %%VERSION%% | ||
Pin-Priority: 1001 | ||
|
||
Package: tedge-watchdog | ||
Pin: version %%VERSION%% | ||
Pin-Priority: 1001 |
38 changes: 38 additions & 0 deletions
38
tests/RobotFramework/tests/cumulocity/self-update/software_update.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
operation = "software_update" | ||
|
||
[init] | ||
action = "proceed" | ||
on_success = "executing" | ||
|
||
[executing] | ||
action = "proceed" | ||
on_success = "prepare" | ||
|
||
[prepare] | ||
script = "sudo /etc/tedge/sm-plugins/apt prepare" | ||
on_success = "self-update" | ||
|
||
[self-update] | ||
# Note: update tedge as it is used by the tedge-agent (as tedge is a multi-call binary) | ||
# Note: installing the new tedge package will not restart the tedge-agent service | ||
script = "sudo /etc/tedge/sm-plugins/apt install tedge" | ||
on_success = "restart-agent" | ||
|
||
[restart-agent] | ||
background_script = "sudo systemctl restart tedge-agent" | ||
on_exec = "await-restart-agent" | ||
|
||
[await-restart-agent] | ||
script = "sleep 10" | ||
on_success = "finalize" | ||
on_kill = "finalize" | ||
|
||
[finalize] | ||
script = "sh -c 'echo Executing state: ${.payload.status}'" | ||
on_success = "successful" | ||
|
||
[successful] | ||
action = "cleanup" | ||
|
||
[failed] | ||
action = "cleanup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters