Skip to content

Commit 7c54683

Browse files
committed
Instead of installing the deadsnakes PPA manually, configure the bootstrap script to do it
1 parent 0dfc064 commit 7c54683

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

actions/workflows/st2_pkg_e2e_test.yaml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ vars:
3030
- vm_windows_id:
3131
- vm_fqdn: <% ctx().hostname %>.<% ctx().dns_zone %>
3232
- vm_info:
33-
- ubuntu_variant: ""
3433
- windows_hostname: <% ctx().hostname %>win
3534
- vm_windows_fqdn: <% ctx().hostname %>win.<% ctx().dns_zone %>
3635
- installed:
3736
distro:
3837
versions:
3938
version_str: not installed
39+
- pipe_into_bootstrap_script: ""
4040
- bootstrap_script_url: <% coalesce(ctx().bootstrap_script, "https://raw.githubusercontent.com/StackStorm/st2-packages/" + ctx().bootstrap_branch + "/scripts/st2_bootstrap.sh") %>
4141
- bootstrap_script_arg_dev_or_ver: <%
4242
switch(
@@ -114,24 +114,12 @@ tasks:
114114
next:
115115
- when: <% succeeded() and "Ubuntu 16" in result().get(ctx().vm_info.private_ip_address).stdout %>
116116
publish:
117-
- ubuntu_variant: "Ubuntu 16"
118-
do: add_deadsnakes_ppa
117+
- pipe_into_bootstrap_script: "echo 'y'"
118+
do: get_bootstrap_script
119119
- when: <% succeeded() and not "Ubuntu 16" in result().get(ctx().vm_info.private_ip_address).stdout %>
120120
do: get_bootstrap_script
121121
- when: <% failed() %>
122122
do: check_debug_mode
123-
add_deadsnakes_ppa:
124-
action: core.remote_sudo
125-
input:
126-
hosts: <% ctx().vm_info.private_ip_address %>
127-
cmd: |-
128-
python3 --version
129-
add-apt-repository ppa:deadsnakes/ppa --yes
130-
apt-get update
131-
apt-get install --yes python3.6
132-
next:
133-
- when: <% succeeded() %>
134-
do: get_bootstrap_script
135123
get_bootstrap_script:
136124
action: core.remote_sudo
137125
input:
@@ -144,7 +132,10 @@ tasks:
144132
action: core.remote_sudo
145133
input:
146134
hosts: <% ctx().vm_info.private_ip_address %>
135+
# If pipe_into_bootstrap_script is not empty, return it + " | "
136+
# If pipe_into_bootstrap_script is empty, return an empty string
147137
cmd: >-
138+
<% switch(ctx().pipe_into_bootstrap_script => concat(ctx().pipe_into_bootstrap_script, " | "), true => "") %>
148139
bash /tmp/st2_bootstrap.sh
149140
--<% ctx().pkg_env %>
150141
--<% ctx().release %>

0 commit comments

Comments
 (0)