mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-17 10:10:25 +00:00
Fixing bootstrap and CICD to install via tag only if version begins with v and use branch otherwise.
This commit is contained in:
parent
a3fed785f8
commit
a8b32ab040
4 changed files with 21 additions and 17 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -263,7 +263,7 @@ jobs:
|
|||
distro-slug: almalinux-9
|
||||
display-name: AlmaLinux 9
|
||||
timeout: 20
|
||||
instances: '["git-3005", "onedir-3005", "git-3006", "onedir-3006", "git-master", "onedir-nightly"]'
|
||||
instances: '["git-v3005", "onedir-3005", "git-3006.x", "onedir-3006", "git-master", "onedir-nightly"]'
|
||||
|
||||
|
||||
amazon-2:
|
||||
|
@ -333,7 +333,7 @@ jobs:
|
|||
distro-slug: centos-stream9
|
||||
display-name: CentOS Stream 9
|
||||
timeout: 20
|
||||
instances: '["git-3005", "onedir-3005", "git-3006", "onedir-3006", "git-master", "onedir-nightly"]'
|
||||
instances: '["git-v3005", "onedir-3005", "git-3006.x", "onedir-3006", "git-master", "onedir-nightly"]'
|
||||
|
||||
|
||||
debian-10:
|
||||
|
@ -529,7 +529,7 @@ jobs:
|
|||
distro-slug: rockylinux-9
|
||||
display-name: Rocky Linux 9
|
||||
timeout: 20
|
||||
instances: '["git-3005", "onedir-3005", "git-3006", "onedir-3006", "git-master", "onedir-nightly"]'
|
||||
instances: '["git-v3005", "onedir-3005", "git-3006.x", "onedir-3006", "git-master", "onedir-nightly"]'
|
||||
|
||||
|
||||
ubuntu-2004:
|
||||
|
|
16
.github/workflows/templates/generate.py
vendored
16
.github/workflows/templates/generate.py
vendored
|
@ -269,6 +269,14 @@ VERSION_DISPLAY_NAMES = {
|
|||
"nightly": "Nightly",
|
||||
}
|
||||
|
||||
GIT_VERSIONS = {
|
||||
"3003": "v3003",
|
||||
"3004": "v3004",
|
||||
"3005": "v3005",
|
||||
"3006": "3006.x",
|
||||
"master": "master",
|
||||
}
|
||||
|
||||
STABLE_VERSION_BLACKLIST = [
|
||||
"master",
|
||||
"nightly",
|
||||
|
@ -400,6 +408,7 @@ def generate_test_jobs():
|
|||
# BSD's don't have a stable release, only use git
|
||||
for bootstrap_type in ("git",):
|
||||
|
||||
_salt_version = salt_version
|
||||
BLACKLIST = {
|
||||
"3003": BLACKLIST_3003,
|
||||
"3004": BLACKLIST_3004,
|
||||
|
@ -415,6 +424,7 @@ def generate_test_jobs():
|
|||
# there is no git version.
|
||||
if salt_version.endswith("-0"):
|
||||
continue
|
||||
_salt_version = GIT_VERSIONS[salt_version]
|
||||
|
||||
if (
|
||||
salt_version in ("3003", "3004")
|
||||
|
@ -422,7 +432,7 @@ def generate_test_jobs():
|
|||
):
|
||||
continue
|
||||
|
||||
kitchen_target = f"{bootstrap_type}-{salt_version}"
|
||||
kitchen_target = f"{bootstrap_type}-{_salt_version}"
|
||||
instances.append(kitchen_target)
|
||||
|
||||
if instances:
|
||||
|
@ -546,6 +556,7 @@ def generate_test_jobs():
|
|||
continue
|
||||
|
||||
for bootstrap_type in ("stable", "git", "onedir", "onedir-rc"):
|
||||
_salt_version = salt_version
|
||||
if bootstrap_type == "onedir":
|
||||
if salt_version not in ONEDIR_SALT_VERSIONS:
|
||||
continue
|
||||
|
@ -593,6 +604,7 @@ def generate_test_jobs():
|
|||
# there is no git version.
|
||||
if salt_version.endswith("-0"):
|
||||
continue
|
||||
_salt_version = GIT_VERSIONS[salt_version]
|
||||
|
||||
if (
|
||||
salt_version in ("3003", "3004", "3005", "3006")
|
||||
|
@ -600,7 +612,7 @@ def generate_test_jobs():
|
|||
):
|
||||
continue
|
||||
|
||||
kitchen_target = f"{bootstrap_type}-{salt_version}"
|
||||
kitchen_target = f"{bootstrap_type}-{_salt_version}"
|
||||
instances.append(kitchen_target)
|
||||
|
||||
if instances:
|
||||
|
|
|
@ -1961,10 +1961,6 @@ if [ "$ITYPE" = "git" ]; then
|
|||
if [ "$__NEW_VS_TAG_REGEX_MATCH" = "MATCH" ]; then
|
||||
_POST_NEON_INSTALL=$BS_TRUE
|
||||
__TAG_REGEX_MATCH="${__NEW_VS_TAG_REGEX_MATCH}"
|
||||
if [ "$(echo "${GIT_REV}" | cut -c -1)" != "v" ]; then
|
||||
# We do this to properly clone tags
|
||||
GIT_REV="v${GIT_REV}"
|
||||
fi
|
||||
echodebug "Post Neon Tag Regex Match On: ${GIT_REV}"
|
||||
else
|
||||
__TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed -E 's/^(v?[0-9]{1,4}\.[0-9]{1,2})(\.[0-9]{1,2})?.*$/MATCH/')
|
||||
|
@ -1976,10 +1972,6 @@ if [ "$ITYPE" = "git" ]; then
|
|||
if [ "$__NEW_VS_TAG_REGEX_MATCH" = "MATCH" ]; then
|
||||
_POST_NEON_INSTALL=$BS_TRUE
|
||||
__TAG_REGEX_MATCH="${__NEW_VS_TAG_REGEX_MATCH}"
|
||||
if [ "$(echo "${GIT_REV}" | cut -c -1)" != "v" ]; then
|
||||
# We do this to properly clone tags
|
||||
GIT_REV="v${GIT_REV}"
|
||||
fi
|
||||
echodebug "Post Neon Tag Regex Match On: ${GIT_REV}"
|
||||
else
|
||||
__TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed 's/^.*\(v\?[[:digit:]]\{1,4\}\.[[:digit:]]\{1,2\}\)\(\.[[:digit:]]\{1,2\}\)\?.*$/MATCH/')
|
||||
|
|
|
@ -150,11 +150,11 @@ platforms:
|
|||
suites:
|
||||
- name: git-3003
|
||||
provisioner:
|
||||
salt_version: 3003
|
||||
salt_version: v3003
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
- name: git-3004
|
||||
provisioner:
|
||||
salt_version: 3004
|
||||
salt_version: v3004
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
|
@ -168,7 +168,7 @@ suites:
|
|||
- openbsd-6
|
||||
- name: git-3005
|
||||
provisioner:
|
||||
salt_version: 3005
|
||||
salt_version: v3005
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
|
@ -182,7 +182,7 @@ suites:
|
|||
- openbsd-6
|
||||
- name: git-3006
|
||||
provisioner:
|
||||
salt_version: 3006.0
|
||||
salt_version: 3006.x
|
||||
salt_bootstrap_options: -x python3 -MPfq git %s
|
||||
excludes:
|
||||
- opensuse-15
|
||||
|
|
Loading…
Add table
Reference in a new issue