mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Rename dev-build
support to nightly-build
, and add rc-build
support
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
8574012381
commit
156215a33f
6 changed files with 48 additions and 24 deletions
9
.github/workflows/build-deb-repo.yml
vendored
9
.github/workflows/build-deb-repo.yml
vendored
|
@ -7,7 +7,10 @@ on:
|
|||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to building packages.
|
||||
dev-build:
|
||||
nightly-build:
|
||||
type: boolean
|
||||
default: false
|
||||
rc-build:
|
||||
type: boolean
|
||||
default: false
|
||||
environment:
|
||||
|
@ -133,8 +136,8 @@ jobs:
|
|||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg-repo deb --key-id=${{ matrix.key-id }} --distro-arch=${{ matrix.arch }} \
|
||||
${{ inputs.dev-build && '--dev-build' }} --salt-version=${{ inputs.salt-version }} \
|
||||
--distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \
|
||||
${{ inputs.nightly-build && '--nightly-build' || '' }} --salt-version=${{ inputs.salt-version }} \
|
||||
${{ inputs.rc-build && '--rc-build' || '' }} --distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
|
|
11
.github/workflows/build-repos.yml
vendored
11
.github/workflows/build-repos.yml
vendored
|
@ -10,7 +10,10 @@ on:
|
|||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to building packages.
|
||||
dev-build:
|
||||
nightly-build:
|
||||
type: boolean
|
||||
default: false
|
||||
rc-build:
|
||||
type: boolean
|
||||
default: false
|
||||
secrets:
|
||||
|
@ -27,7 +30,8 @@ jobs:
|
|||
with:
|
||||
environment: ${{ inputs.environment }}
|
||||
salt-version: "${{ inputs.salt-version }}"
|
||||
dev-build: ${{ inputs.dev-build }}
|
||||
nightly-build: ${{ inputs.nightly-build }}
|
||||
rc-build: ${{ inputs.rc-build }}
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
|
||||
|
@ -37,6 +41,7 @@ jobs:
|
|||
with:
|
||||
environment: ${{ inputs.environment }}
|
||||
salt-version: "${{ inputs.salt-version }}"
|
||||
dev-build: ${{ inputs.dev-build }}
|
||||
nightly-build: ${{ inputs.nightly-build }}
|
||||
rc-build: ${{ inputs.rc-build }}
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
|
|
10
.github/workflows/build-rpm-repo.yml
vendored
10
.github/workflows/build-rpm-repo.yml
vendored
|
@ -7,7 +7,10 @@ on:
|
|||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to building packages.
|
||||
dev-build:
|
||||
nightly-build:
|
||||
type: boolean
|
||||
default: false
|
||||
rc-build:
|
||||
type: boolean
|
||||
default: false
|
||||
environment:
|
||||
|
@ -143,8 +146,9 @@ jobs:
|
|||
- name: Create Repository
|
||||
run: |
|
||||
tools pkg-repo rpm --key-id=${{ matrix.key-id }} --distro-arch=${{ matrix.arch }} \
|
||||
${{ inputs.dev-build && '--dev-build' }} --salt-version=${{ inputs.salt-version }} \
|
||||
--distro=${{ matrix.distro }} --distro-version=${{ matrix.version }} \
|
||||
${{ inputs.nightly-build && '--nightly-build' || '' }} --salt-version=${{ inputs.salt-version }} \
|
||||
${{ inputs.rc-build && '--rc-build' || '' }} --distro=${{ matrix.distro }} \
|
||||
--distro-version=${{ matrix.version }} \
|
||||
--incoming=artifacts/pkgs/incoming --repo-path=artifacts/pkgs/repo
|
||||
|
||||
- name: Upload Repository As An Artifact
|
||||
|
|
2
.github/workflows/nightly.yml
vendored
2
.github/workflows/nightly.yml
vendored
|
@ -652,7 +652,7 @@ jobs:
|
|||
with:
|
||||
environment: nightly
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
dev-build: true
|
||||
nightly-build: true
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
|
||||
|
|
2
.github/workflows/templates/nightly.yml.j2
vendored
2
.github/workflows/templates/nightly.yml.j2
vendored
|
@ -31,7 +31,7 @@ concurrency:
|
|||
with:
|
||||
environment: nightly
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
dev-build: true
|
||||
nightly-build: true
|
||||
secrets:
|
||||
SECRETS_KEY: ${{ secrets.SECRETS_KEY }}
|
||||
|
||||
|
|
|
@ -46,9 +46,6 @@ pkg = command_group(
|
|||
"help": "The distribution architecture",
|
||||
"choices": ("x86_64", "amd64", "aarch64", "arm64"),
|
||||
},
|
||||
"dev_build": {
|
||||
"help": "Developement repository target",
|
||||
},
|
||||
"repo_path": {
|
||||
"help": "Path where the repository shall be created.",
|
||||
"required": True,
|
||||
|
@ -64,6 +61,12 @@ pkg = command_group(
|
|||
),
|
||||
"required": True,
|
||||
},
|
||||
"nightly_build": {
|
||||
"help": "Developement repository target",
|
||||
},
|
||||
"rc_build": {
|
||||
"help": "Release Candidate repository target",
|
||||
},
|
||||
},
|
||||
)
|
||||
def debian(
|
||||
|
@ -75,7 +78,8 @@ def debian(
|
|||
repo_path: pathlib.Path = None,
|
||||
key_id: str = None,
|
||||
distro_arch: str = "amd64",
|
||||
dev_build: bool = False,
|
||||
nightly_build: bool = False,
|
||||
rc_build: bool = False,
|
||||
):
|
||||
"""
|
||||
Create the debian repository.
|
||||
|
@ -152,7 +156,7 @@ def debian(
|
|||
ftp_archive_config_suite = (
|
||||
f"""\n APT::FTPArchive::Release::Suite "{suitename}";\n"""
|
||||
)
|
||||
archive_description = f"SaltProject {display_name} Python 3{'' if dev_build else ' development'} Salt package repo"
|
||||
archive_description = f"SaltProject {display_name} Python 3{'' if nightly_build else ' development'} Salt package repo"
|
||||
ftp_archive_config = f"""\
|
||||
APT::FTPArchive::Release::Origin "SaltProject";
|
||||
APT::FTPArchive::Release::Label "{label}";{ftp_archive_config_suite}
|
||||
|
@ -171,8 +175,10 @@ def debian(
|
|||
}}
|
||||
"""
|
||||
ctx.info("Creating repository directory structure ...")
|
||||
create_repo_path = repo_path / "py3" / distro / distro_version / distro_arch
|
||||
if dev_build is False:
|
||||
if nightly_build or rc_build:
|
||||
create_repo_path = repo_path / "salt"
|
||||
create_repo_path = create_repo_path / "py3" / distro / distro_version / distro_arch
|
||||
if nightly_build is False:
|
||||
create_repo_path = create_repo_path / "minor" / salt_version
|
||||
create_repo_path.mkdir(exist_ok=True, parents=True)
|
||||
ftp_archive_config_file = create_repo_path / "apt-ftparchive.conf"
|
||||
|
@ -263,7 +269,7 @@ def debian(
|
|||
|
||||
ctx.info(f"Running '{' '.join(cmdline)}' ...")
|
||||
ctx.run(*cmdline, cwd=create_repo_path)
|
||||
if dev_build is False:
|
||||
if nightly_build is False:
|
||||
ctx.info("Creating '<major-version>' and 'latest' symlinks ...")
|
||||
major_version = packaging.version.parse(salt_version).major
|
||||
major_link = create_repo_path.parent.parent / str(major_version)
|
||||
|
@ -312,9 +318,12 @@ def debian(
|
|||
),
|
||||
"required": True,
|
||||
},
|
||||
"dev_build": {
|
||||
"nightly_build": {
|
||||
"help": "Developement repository target",
|
||||
},
|
||||
"rc_build": {
|
||||
"help": "Release Candidate repository target",
|
||||
},
|
||||
},
|
||||
)
|
||||
def rpm(
|
||||
|
@ -326,7 +335,8 @@ def rpm(
|
|||
repo_path: pathlib.Path = None,
|
||||
key_id: str = None,
|
||||
distro_arch: str = "amd64",
|
||||
dev_build: bool = False,
|
||||
nightly_build: bool = False,
|
||||
rc_build: bool = False,
|
||||
):
|
||||
"""
|
||||
Create the redhat repository.
|
||||
|
@ -364,8 +374,10 @@ def rpm(
|
|||
ctx.exit(1)
|
||||
|
||||
ctx.info("Creating repository directory structure ...")
|
||||
create_repo_path = repo_path / "py3" / distro / distro_version / distro_arch
|
||||
if dev_build is False:
|
||||
if nightly_build or rc_build:
|
||||
create_repo_path = repo_path / "salt"
|
||||
create_repo_path = create_repo_path / "py3" / distro / distro_version / distro_arch
|
||||
if nightly_build is False:
|
||||
create_repo_path = create_repo_path / "minor" / salt_version
|
||||
create_repo_path.joinpath("SRPMS").mkdir(exist_ok=True, parents=True)
|
||||
|
||||
|
@ -409,7 +421,7 @@ def rpm(
|
|||
else:
|
||||
ctx.run("createrepo", ".", cwd=create_repo_path)
|
||||
|
||||
if dev_build is False:
|
||||
if nightly_build is False:
|
||||
ctx.info("Creating '<major-version>' and 'latest' symlinks ...")
|
||||
major_version = packaging.version.parse(salt_version).major
|
||||
major_link = create_repo_path.parent.parent / str(major_version)
|
||||
|
|
Loading…
Add table
Reference in a new issue