Skip to content

Commit

Permalink
feat(kitchen): use bootstrapped opensuse images until 2019.2.2
Browse files Browse the repository at this point in the history
* The current pre-salted `opensuse` images are using `mirror.23media.com`
  - https://github.com/netmanagers/salt-image-builder/blob/d6e57f6b22570530a627c89a94fed02754a3197d/scripts/prepare.sh#L99
  - This has been proving to be unreliable in recent days, causing failed builds
* Preparing new pre-salted images would pull in `2019.2.1`, which is a no-go
  - netmanagers/salt-image-builder#7
  - saltstack/salt#54765
* This workaround is to use bootstrapped images in the interim
  • Loading branch information
myii committed Oct 1, 2019
1 parent e386630 commit 25946b0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ ssf_node_anchors:
# An alternative method could be to use:
# `git describe --abbrev=0 --tags`
# yamllint disable rule:line-length
title: 'test(inspec): add remaining platforms [skip ci]'
body: '* Automated using https://github.com/myii/ssf-formula/pull/51'
title: 'ci(kitchen): use bootstrapped `opensuse` images until `2019.2.2` [skip ci]'
body: '* Automated using https://github.com/myii/ssf-formula/pull/52'
# yamllint enable rule:line-length
github:
owner: saltstack-formulas
Expand Down
17 changes: 15 additions & 2 deletions ssf/files/default/kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@

{%- macro format_driver_image(os, os_ver, salt_ver, py_ver) %}
{%- filter indent(6) %}
{%- if os == 'opensuse/leap' %}
image: {{ os }}:{{ os_ver }}
{%- else %}
image: netmanagers/salt-{{ salt_ver }}-py{{ py_ver }}:{{ os | replace('/', '-') }}-{{ os_ver }}
{%- endif %}
{%- endfilter %}
{%- endmacro %}

Expand All @@ -59,10 +63,16 @@ image: netmanagers/salt-{{ salt_ver }}-py{{ py_ver }}:{{ os | replace('/', '-')
{#- Need to look at if this can be resolved from within the formulas themselves, though #}
{%- filter indent(6) %}
{%- set prov_cmds = [] %}
{#- Specific to unsalted `opensuse/leap` #}
{%- if os == 'opensuse/leap' %}
{%- do prov_cmds.append('- systemctl enable sshd.service') %}
{%- endif %}
{#- Specific to `develop` #}
{%- if salt_ver == 'develop' %}
{%- do prov_cmds.append('- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com') %}
{%- do prov_cmds.append('- sh bootstrap-salt.sh -XdPbfrq -x python{0} git {1}'.format(py_ver, salt_ver)) %}
{%- if os != 'opensuse/leap' %}
{%- do prov_cmds.append('- curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com') %}
{%- do prov_cmds.append('- sh bootstrap-salt.sh -XdPbfrq -x python{0} git {1}'.format(py_ver, salt_ver)) %}
{%- endif %}
{%- if semrel_formula == 'deepsea' %}
{%- if os in ['centos', 'fedora'] %}
{%- do prov_cmds.append('- yum install make -y') %}
Expand Down Expand Up @@ -159,6 +169,9 @@ platforms:
{{- format_driver_prov_cmds(os, os_ver, salt_ver, py_ver) }}
{{- format_driver_run_cmds(os, os_ver) }}
{%- if [os, os_ver] == ['opensuse/leap', 15] %}
provisioner:
salt_bootstrap_options: -XdPfrq -x python{{ py_ver }} git {{ salt_ver }}
salt_install: bootstrap
# Workaround to avoid intermittent failures on `opensuse-leap-15`:
# => SCP did not finish successfully (255): (Net::SCP::Error)
transport:
Expand Down

0 comments on commit 25946b0

Please sign in to comment.