Skip to content

Commit 2e2b7dd

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

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

actions/workflows/st2_pkg_e2e_test.yaml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ vars:
3737
distro:
3838
versions:
3939
version_str: not installed
40+
- pipe_into_bootstrap_script: ""
4041
- bootstrap_script_url: <% coalesce(ctx().bootstrap_script, "https://raw.githubusercontent.com/StackStorm/st2-packages/" + ctx().bootstrap_branch + "/scripts/st2_bootstrap.sh") %>
4142
- bootstrap_script_arg_dev_or_ver: <%
4243
switch(
@@ -114,24 +115,12 @@ tasks:
114115
next:
115116
- when: <% succeeded() and "Ubuntu 16" in result().get(ctx().vm_info.private_ip_address).stdout %>
116117
publish:
117-
- ubuntu_variant: "Ubuntu 16"
118-
do: add_deadsnakes_ppa
118+
- pipe_into_bootstrap_script: "echo 'y'"
119+
do: get_bootstrap_script
119120
- when: <% succeeded() and not "Ubuntu 16" in result().get(ctx().vm_info.private_ip_address).stdout %>
120121
do: get_bootstrap_script
121122
- when: <% failed() %>
122123
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
135124
get_bootstrap_script:
136125
action: core.remote_sudo
137126
input:
@@ -144,7 +133,10 @@ tasks:
144133
action: core.remote_sudo
145134
input:
146135
hosts: <% ctx().vm_info.private_ip_address %>
136+
# If pipe_into_bootstrap_script is not empty, return it + " | "
137+
# If pipe_into_bootstrap_script is empty, return an empty string
147138
cmd: >-
139+
<% switch(ctx().pipe_into_bootstrap_script => concat(ctx().pipe_into_bootstrap_script, " | "), true => "") %>
148140
bash /tmp/st2_bootstrap.sh
149141
--<% ctx().pkg_env %>
150142
--<% ctx().release %>

0 commit comments

Comments
 (0)