Skip to content
Closed
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
20 changes: 19 additions & 1 deletion actions/workflows/st2_pkg_e2e_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ vars:
distro:
versions:
version_str: not installed
- pipe_into_bootstrap_script: ""
- bootstrap_script_url: <% coalesce(ctx().bootstrap_script, "https://raw.githubusercontent.com/StackStorm/st2-packages/" + ctx().bootstrap_branch + "/scripts/st2_bootstrap.sh") %>
- bootstrap_script_arg_dev_or_ver: <%
switch(
Expand Down Expand Up @@ -99,12 +100,26 @@ tasks:
publish:
- vm_info: <% result().output.vm_info %>
- vm_id: <% result().output.vm_info.id %>
do: get_bootstrap_script
do: check_for_ubuntu_xenial
- when: <% failed() %>
publish:
- vm_id: <% result().output.get("vm_info", {}).get("id") %>
- failed: True
do: cleanup
check_for_ubuntu_xenial:
action: core.remote
input:
hosts: <% ctx().vm_info.private_ip_address %>
cmd: cat /etc/issue
next:
- when: <% succeeded() and "Ubuntu 16" in result().get(ctx().vm_info.private_ip_address).stdout %>
publish:
- pipe_into_bootstrap_script: "echo 'y'"
do: get_bootstrap_script
- when: <% succeeded() and not "Ubuntu 16" in result().get(ctx().vm_info.private_ip_address).stdout %>
do: get_bootstrap_script
- when: <% failed() %>
do: check_debug_mode
get_bootstrap_script:
action: core.remote_sudo
input:
Expand All @@ -117,7 +132,10 @@ tasks:
action: core.remote_sudo
input:
hosts: <% ctx().vm_info.private_ip_address %>
# If pipe_into_bootstrap_script is not empty, return it + " | "
# If pipe_into_bootstrap_script is empty, return an empty string
cmd: >-
<% switch(ctx().pipe_into_bootstrap_script => concat(ctx().pipe_into_bootstrap_script, " | "), true => "") %>
Copy link
Member

@arm4b arm4b Dec 15, 2020

Choose a reason for hiding this comment

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

That should work in this particular case.

However I provided --u16-add-insecure-py3-ppa flag as identified more bash corner cases with the interactive mode under different environments. StackStorm/st2-packages#682. It might be more clear to rely on that new flag.

bash /tmp/st2_bootstrap.sh
--<% ctx().pkg_env %>
--<% ctx().release %>
Comment on lines 139 to 141
Copy link
Member

@arm4b arm4b Dec 15, 2020

Choose a reason for hiding this comment

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

Feel free to pass that U16 flag to script directly without extra workflow logic as our installer is catch-all and won't fail in case of non-existent CLI param provided.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Even better!

Copy link
Member

Choose a reason for hiding this comment

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

As StackStorm/st2-packages#682 is now merged, you can add --u16-add-insecure-py3-ppa

Expand Down