Skip to content
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

feat: overhaul CI implementation and use latest pre-salted images #293

Merged
merged 6 commits into from
Mar 7, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion ssf/config/formulas.sls
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ prepare-git-branch-for-{{ formula }}:
{#- Work through each inspec suite defined for the formula, ordered by the suite number #}
{%- for index in range(0, inspec_suites_kitchen | length) %}
{%- set suite = inspec_suites_kitchen[index] %}
{%- set dest_file = semrel_file_specs.dest_file | d(semrel_file ) %}
{%- set dest_file = semrel_file_specs.dest_file | d(semrel_file) %}
{#- Only manage files for the suite if the `suite.name` is set #}
{#- Or if dealing with CI files (where an empty `suite.name` is actually used) #}
{%- if suite.name or dest_file in ['.cirrus.yml', '.travis.yml'] %}
Expand Down
130 changes: 50 additions & 80 deletions ssf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ ssf_node_anchors:
# An alternative method could be to use:
# `git describe --abbrev=0 --tags`
# yamllint disable rule:line-length rule:quoted-strings
title: "chore(yamllint): add '`'.git/'`' to ignores [skip ci]"
body: '* Automated using https://github.com/myii/ssf-formula/pull/297'
title: "ci(kitchen+gitlab-ci): use latest pre-salted images"
body: '* Automated using https://github.com/myii/ssf-formula/pull/293'
# yamllint enable rule:line-length rule:quoted-strings
github:
owner: 'saltstack-formulas'
Expand Down Expand Up @@ -109,7 +109,10 @@ ssf_node_anchors:
- suse
- freebsd
- amazon
- oracle
- arch
- gentoo
- windows
provisioner:
dependencies: []
# Structure assumes `top.sls:base`
Expand All @@ -135,69 +138,20 @@ ssf_node_anchors:
filename: 'map.jinja'
verification: {}
platforms:
# Could use `opensuse-leap` throughout since `/` never used at this end
# Would have to modify the `if` in the `kitchen.yml` template(s), though
# Also, may have to be careful with versions such as `18.04` being seen
# as numbers (for comparisons)
# [os , os_ver, salt_ver, py_ver]

### `master-py3`
- [debian , 10 , master, 3]
- [ubuntu , 18.04, master, 3]
- [centos , 8 , master, 3]
- [fedora , 31 , master, 3]
- [opensuse/leap, 15.1 , master, 3]
### ` master-py2`
- [amazonlinux , 2 , master, 3]

### `2019.2-py3`
- [debian , 10 , 2019.2, 3]
- [debian , 9 , 2019.2, 3]
- [ubuntu , 18.04, 2019.2, 3]
# - [ubuntu , 16.04, 2019.2, 3]
- [centos , 8 , 2019.2, 3]
# - [centos , 7 , 2019.2, 3]
- [fedora , 31 , 2019.2, 3]
- [opensuse/leap, 15.1 , 2019.2, 3]
### `2019.2-py2`
# - [ubuntu , 18.04, 2019.2, 2]
- [centos , 7 , 2019.2, 2]
- [amazonlinux , 2 , 2019.2, 3]
- [arch-base , latest, 2019.2, 2]

### `2018.3-py3`
- [fedora , 30 , 2018.3, 3]
### `2018.3-py2`
# - [debian , 10 , 2018.3, 2]
- [debian , 9 , 2018.3, 2]
# - [debian , 8 , 2018.3, 2]
# - [ubuntu , 18.04, 2018.3, 2]
- [ubuntu , 16.04, 2018.3, 2]
- [centos , 7 , 2018.3, 2]
# - [centos , 6 , 2018.3, 2]
- [opensuse/leap, 15.1 , 2018.3, 2]
- [amazonlinux , 1 , 2018.3, 2]
- [arch-base , latest, 2018.3, 2]

### `2017.7-py2`
- [debian , 8 , 2017.7, 2]
- [ubuntu , 16.04, 2017.7, 2]
- [centos , 6 , 2017.7, 2]
- [fedora , 30 , 2017.7, 2]
- [opensuse/leap, 15.1 , 2017.7, 2]
- [amazonlinux , 1 , 2017.7, 2]
- [arch-base , latest, 2017.7, 2]

- [0 , 0 , 0 , 0]
platforms_matrix:
# Comments in `platforms` apply here, too
# [os , os_ver, salt_ver, py_ver, inspec_suite]
- [debian , 10 , master, 3, default]
- [ubuntu , 18.04, 2019.2, 3, default]
- [opensuse/leap, 15.1 , 2019.2, 3, default]
- [amazonlinux , 2 , 2019.2, 3, default]
- [fedora , 30 , 2018.3, 3, default]
- [arch-base , latest, 2018.3, 2, default]
# # - [centos , 6 , 2017.7, 2, default]
- [debian , 0 , master, 0, default]
- [ubuntu , 0 , master, 0, default]
- [centos , 0 , master, 0, default]
- [fedora , 0 , master, 0, default]
- [opensuse/leap, 0 , master, 0, default]
- [opensuse/tmbl, 0 , master, 0, default]
- [amazonlinux , 0 , master, 0, default]
- [oraclelinux , 0 , master, 0, default]
- [gentoo/stage3, 0 , master, 0, default]
- [arch-base , 0 , 3002.2, 0, default]
# To deal with excessive instances when mimicking `kitchen list -b`
# If values are set, only use these as commented entries in the matrix
platforms_matrix_commented_includes: []
Expand Down Expand Up @@ -346,8 +300,7 @@ ssf:
- [opensuse/tmbl, latest, master, 3] # opsu-tmbl-master-py3
- [amazonlinux , 2 , master, 3] # amaz-02.0-master-py3
- [oraclelinux , 8 , master, 3] # orac-08.0-master-py3
# # Fails due to dependency issues, probably ignore permanently
# - [oraclelinux , 7 , master, 3] # orac-07.0-master-py3
- [oraclelinux , 7 , master, 3] # orac-07.0-master-py3
- [gentoo/stage3, latest, master, 3] # gent-late-master-py3
- [gentoo/stage3, systemd, master, 3] # gent-sysd-master-py3

Expand Down Expand Up @@ -407,6 +360,7 @@ ssf:
- [ubuntu , 16.04, 3000.6, 2] # ubun-16.0-3000.6-py2
- [arch-base , latest, 3000.6, 2] # arch-late-3000.6-py2

saltimages_deprecated:
### Deprecated, no longer being built but still available in Docker Hub
### `master-py3`
- [fedora , 31 , master, 3] # fedo-31.0-master-py3
Expand Down Expand Up @@ -580,7 +534,7 @@ ssf:
name: 'modules'
2:
<<: *isk_suite_default
name: 'arch'
name: ''
apt:
<<: *formula_default
context:
Expand Down Expand Up @@ -716,6 +670,9 @@ ssf:
1:
<<: *isk_suite_default
name: 'package'
2:
<<: *isk_suite_default
name: ''
grafana: *formula_default
haproxy: *formula_default
hostsfile: *formula_default
Expand All @@ -730,6 +687,9 @@ ssf:
1:
<<: *isk_suite_default
name: 'tables'
2:
<<: *isk_suite_default
name: ''
iscsi:
<<: *formula_default
context:
Expand All @@ -753,20 +713,23 @@ ssf:
name: 'adopt'
1:
<<: *isk_suite_default
name: 'amazon'
name: 'share'
2:
<<: *isk_suite_default
name: 'graalvm'
name: 'amazon'
3:
<<: *isk_suite_default
name: 'haikuvm'
name: 'graalvm'
4:
<<: *isk_suite_default
name: 'intellij'
name: 'haikuvm'
5:
<<: *isk_suite_default
name: 'oracle'
name: 'intellij'
6:
<<: *isk_suite_default
name: 'oracle'
7:
<<: *isk_suite_default
name: 'zulu'
jetbrains-appcode: *formula_default
Expand Down Expand Up @@ -916,8 +879,7 @@ ssf:
name: 'repo'
3:
<<: *isk_suite_default
name: 'amazonlinux'
mattermost: *formula_default
name: ''
maven:
<<: *formula_default
context:
Expand Down Expand Up @@ -957,6 +919,9 @@ ssf:
1:
<<: *isk_suite_default
name: 'mode-eq-none'
2:
<<: *isk_suite_default
name: ''
openldap: *formula_default
openntpd:
<<: *formula_default
Expand Down Expand Up @@ -1018,6 +983,9 @@ ssf:
9:
<<: *isk_suite_default
name: 'arch'
10:
<<: *isk_suite_default
name: 'gentoo'
php:
<<: *formula_default
context:
Expand Down Expand Up @@ -1056,18 +1024,21 @@ ssf:
<<: *context_default
inspec_suites_kitchen:
<<: *isk_default
0:
1:
<<: *isk_suite_default
name: 'debian'
1:
2:
<<: *isk_suite_default
name: 'redhat'
2:
3:
<<: *isk_suite_default
name: 'suse'
3:
4:
<<: *isk_suite_default
name: 'amazonlinux'
5:
<<: *isk_suite_default
name: 'gentoo'
prometheus:
<<: *formula_default
context:
Expand All @@ -1077,6 +1048,9 @@ ssf:
1:
<<: *isk_suite_default
name: 'repo'
2:
<<: *isk_suite_default
name: ''
rabbitmq:
<<: *formula_default
context:
Expand Down Expand Up @@ -1139,7 +1113,6 @@ ssf:
sqldeveloper: *formula_default
sqlplus: *formula_default
ssf: *formula_default
stack: *formula_default
strongswan: *formula_default
stunnel: *formula_default
sudoers:
Expand Down Expand Up @@ -1167,9 +1140,6 @@ ssf:
<<: *isk_suite_default
name: 'share'
2:
<<: *isk_suite_default
name: 'upstart'
3:
<<: *isk_suite_default
name: 'gentoo'
timezone: *formula_default
Expand Down
1 change: 1 addition & 0 deletions ssf/files/default/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ rubocop:
before_script:
{%- if semrel_formula == 'keepalived' %}
- 'apk --no-cache add ipvsadm'
- 'modprobe ip_vs || true'
{%- endif %}
# TODO: This should work from the env vars above automatically
- 'bundle config set path "${BUNDLE_CACHE_PATH}"'
Expand Down
Loading