-
Notifications
You must be signed in to change notification settings - Fork 9
Check for Ubuntu 16.04 and conditionally install Python 3.6 and configure ST2 to use it #194
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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( | ||
|
|
@@ -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: | ||
|
|
@@ -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 => "") %> | ||
| bash /tmp/st2_bootstrap.sh | ||
| --<% ctx().pkg_env %> | ||
| --<% ctx().release %> | ||
|
Comment on lines
139
to
141
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even better!
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As StackStorm/st2-packages#682 is now merged, you can add |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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-ppaflag 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.