Merge 3006.x into 3007.x

This commit is contained in:
Pedro Algarvio 2024-01-17 07:29:32 +00:00
commit 349d701924
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF
28 changed files with 62 additions and 58 deletions

View file

@ -42,6 +42,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -34,6 +34,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -19,6 +19,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:
build:

View file

@ -41,6 +41,7 @@ env:
COLUMNS: 190
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:
@ -335,7 +336,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ${{ steps.set-artifact-name.outputs.artifact-name }}
path: ~/rpmbuild/RPMS/*/*.rpm
path: ~/rpmbuild/RPMS/${{ matrix.arch == 'arm64' && 'aarch64' || matrix.arch }}/*.rpm
retention-days: 7
if-no-files-found: error

View file

@ -34,6 +34,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -18,6 +18,7 @@ env:
COLUMNS: 190
CACHE_SEED: SEED-4 # Bump the number to invalidate all caches
RELENV_DATA: "${{ github.workspace }}/.relenv"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files

View file

@ -13,6 +13,7 @@ on:
env:
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -24,6 +24,7 @@ env:
COLUMNS: 190
CACHE_SEED: SEED-4 # Bump the number to invalidate all caches
RELENV_DATA: "${{ github.workspace }}/.relenv"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files
@ -2569,7 +2570,7 @@ jobs:
- name: Download RPM Packages
uses: actions/download-artifact@v3
with:
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-rpm
path: artifacts/pkgs/incoming
- name: Setup GnuPG

View file

@ -23,6 +23,7 @@ env:
COLUMNS: 190
CACHE_SEED: SEED-4 # Bump the number to invalidate all caches
RELENV_DATA: "${{ github.workspace }}/.relenv"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
permissions:
contents: write # To be able to publish the release

View file

@ -14,6 +14,7 @@ env:
COLUMNS: 190
CACHE_SEED: SEED-4 # Bump the number to invalidate all caches
RELENV_DATA: "${{ github.workspace }}/.relenv"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files

View file

@ -39,6 +39,7 @@ env:
COLUMNS: 190
CACHE_SEED: SEED-4 # Bump the number to invalidate all caches
RELENV_DATA: "${{ github.workspace }}/.relenv"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files
@ -2411,7 +2412,7 @@ jobs:
- name: Download RPM Packages
uses: actions/download-artifact@v3
with:
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-rpm
path: artifacts/pkgs/incoming
- name: Setup GnuPG

View file

@ -3,18 +3,7 @@
fail-fast: false
matrix:
include:
<%- for distro, version, arch in (
("debian", "10", "x86_64"),
("debian", "10", "arm64"),
("debian", "11", "x86_64"),
("debian", "11", "arm64"),
("debian", "12", "x86_64"),
("debian", "12", "arm64"),
("ubuntu", "20.04", "x86_64"),
("ubuntu", "20.04", "arm64"),
("ubuntu", "22.04", "x86_64"),
("ubuntu", "22.04", "arm64"),
) %>
<%- for distro, version, arch in build_debs_listing %>
- pkg-type: deb
distro: <{ distro }>
version: "<{ version }>"

View file

@ -42,6 +42,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -3,41 +3,7 @@
fail-fast: false
matrix:
include:
<%- for distro, version, arch in (
("amazon", "2", "x86_64"),
("amazon", "2", "arm64"),
("amazon", "2", "aarch64"),
("amazon", "2023", "x86_64"),
("amazon", "2023", "arm64"),
("amazon", "2023", "aarch64"),
("redhat", "7", "x86_64"),
("redhat", "7", "arm64"),
("redhat", "7", "aarch64"),
("redhat", "8", "x86_64"),
("redhat", "8", "arm64"),
("redhat", "8", "aarch64"),
("redhat", "9", "x86_64"),
("redhat", "9", "arm64"),
("redhat", "9", "aarch64"),
("fedora", "36", "x86_64"),
("fedora", "36", "arm64"),
("fedora", "36", "aarch64"),
("fedora", "37", "x86_64"),
("fedora", "37", "arm64"),
("fedora", "37", "aarch64"),
("fedora", "38", "x86_64"),
("fedora", "38", "arm64"),
("fedora", "38", "aarch64"),
("photon", "3", "x86_64"),
("photon", "3", "arm64"),
("photon", "3", "aarch64"),
("photon", "4", "x86_64"),
("photon", "4", "arm64"),
("photon", "4", "aarch64"),
("photon", "5", "x86_64"),
("photon", "5", "arm64"),
("photon", "5", "aarch64"),
) %>
<%- for distro, version, arch in build_rpms_listing %>
- pkg-type: rpm
distro: <{ distro }>
version: "<{ version }>"
@ -66,7 +32,7 @@
- name: Download RPM Packages
uses: actions/download-artifact@v3
with:
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch }}-rpm
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-rpm
path: artifacts/pkgs/incoming
- name: Setup GnuPG

View file

@ -36,6 +36,7 @@ env:
COLUMNS: 190
CACHE_SEED: SEED-4 # Bump the number to invalidate all caches
RELENV_DATA: "${{ github.workspace }}/.relenv"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
<%- endblock env %>

View file

@ -54,6 +54,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -76,6 +76,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -69,6 +69,7 @@ env:
COLUMNS: 190
PIP_INDEX_URL: "https://pypi-proxy.saltstack.net/root/local/+simple/"
PIP_EXTRA_INDEX_URL: "https://pypi.org/simple"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -76,6 +76,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -54,6 +54,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -71,6 +71,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -64,6 +64,7 @@ env:
COLUMNS: 190
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -71,6 +71,7 @@ env:
AWS_RETRY_MODE: "adaptive"
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
PIP_DISABLE_PIP_VERSION_CHECK: "1"
jobs:

View file

@ -483,7 +483,10 @@ def onedir_dependencies(
assert package_name is not None
assert platform is not None
if platform not in ("macos", "darwin") and arch == "arm64":
if platform == "darwin":
platform = "macos"
if platform != "macos" and arch == "arm64":
arch = "aarch64"
shared_constants = _get_shared_constants()
@ -622,6 +625,9 @@ def salt_onedir(
assert platform is not None
assert package_name is not None
if platform == "darwin":
platform = "macos"
shared_constants = _get_shared_constants()
if not relenv_version:
relenv_version = shared_constants["relenv_version"]
@ -703,7 +709,7 @@ def salt_onedir(
str(salt_archive),
env=env,
)
if platform == "darwin":
if platform == "macos":
def errfn(fn, path, err):
ctx.info(f"Removing {path} failed: {err}")

View file

@ -917,7 +917,7 @@ def _create_onedir_based_repo(
if distro == "onedir":
if "-onedir-linux-" in dpath.name.lower():
release_os = "linux"
elif "-onedir-darwin-" in dpath.name.lower():
elif "-onedir-macos-" in dpath.name.lower():
release_os = "macos"
elif "-onedir-windows-" in dpath.name.lower():
release_os = "windows"

View file

@ -252,6 +252,26 @@ def generate_workflows(ctx: Context):
for _, arch, _ in test_salt_pkg_downloads_listing[platform]:
test_salt_pkg_downloads_needs_slugs.add("build-ci-deps")
build_rpms_listing = []
for distro, releases in (
("amazon", ("2", "2023")),
("redhat", ("7", "8", "9")),
("fedora", ("36", "37", "38")),
("photon", ("3", "4", "5")),
):
for release in releases:
for arch in ("x86_64", "arm64", "aarch64"):
build_rpms_listing.append((distro, release, arch))
build_debs_listing = []
for distro, releases in (
("debian", ("10", "11", "12")),
("ubuntu", ("20.04", "22.04")),
):
for release in releases:
for arch in ("x86_64", "arm64"):
build_debs_listing.append((distro, release, arch))
env = Environment(
block_start_string="<%",
block_end_string="%>",
@ -293,6 +313,8 @@ def generate_workflows(ctx: Context):
"test_salt_pkg_downloads_needs_slugs": sorted(
test_salt_pkg_downloads_needs_slugs
),
"build_rpms_listing": build_rpms_listing,
"build_debs_listing": build_debs_listing,
}
shared_context = yaml.safe_load(
tools.utils.SHARED_WORKFLOW_CONTEXT_FILEPATH.read_text()

View file

@ -133,13 +133,13 @@ def download_onedir_artifact(
Download onedir artifact from staging bucket.
"""
s3 = boto3.client("s3")
if platform == "macos":
platform = "darwin"
if platform == "darwin":
platform = "macos"
if arch == "arm64":
arch = "aarch64"
arch = arch.lower()
platform = platform.lower()
if platform in ("linux", "darwin") and arch not in ("x86_64", "aarch64"):
if platform in ("linux", "macos") and arch not in ("x86_64", "aarch64"):
ctx.error(
f"The 'arch' value for {platform} must be one of: 'x86_64', 'aarch64', 'arm64'"
)

View file

@ -38,7 +38,7 @@ download = command_group(
},
"platform": {
"help": "The onedir platform artifact to download",
"choices": ("linux", "darwin", "windows"),
"choices": ("linux", "macos", "windows"),
"required": True,
},
"arch": {