mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Define a variable for the path to shared-gh-workflows-context.yml
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
d933bec989
commit
a81f58f37d
4 changed files with 8 additions and 10 deletions
|
@ -709,10 +709,9 @@ def get_release_changelog_target(ctx: Context, event_name: str):
|
|||
if TYPE_CHECKING:
|
||||
assert github_output is not None
|
||||
|
||||
shared_context_file = (
|
||||
tools.utils.REPO_ROOT / "cicd" / "shared-gh-workflows-context.yml"
|
||||
shared_context = yaml.safe_load(
|
||||
tools.utils.SHARED_WORKFLOW_CONTEXT_FILEPATH.read_text()
|
||||
)
|
||||
shared_context = yaml.safe_load(shared_context_file.read_text())
|
||||
release_branches = shared_context["release-branches"]
|
||||
|
||||
release_changelog_target = "next-major-release"
|
||||
|
|
|
@ -30,10 +30,7 @@ build = command_group(
|
|||
|
||||
|
||||
def _get_shared_constants():
|
||||
shared_constants = (
|
||||
tools.utils.REPO_ROOT / "cicd" / "shared-gh-workflows-context.yml"
|
||||
)
|
||||
return yaml.safe_load(shared_constants.read_text())
|
||||
return yaml.safe_load(tools.utils.SHARED_WORKFLOW_CONTEXT_FILEPATH.read_text())
|
||||
|
||||
|
||||
@build.command(
|
||||
|
|
|
@ -116,10 +116,9 @@ def generate_workflows(ctx: Context):
|
|||
"prepare_workflow_needs": NeedsTracker(),
|
||||
"build_repo_needs": NeedsTracker(),
|
||||
}
|
||||
shared_context_file = (
|
||||
tools.utils.REPO_ROOT / "cicd" / "shared-gh-workflows-context.yml"
|
||||
shared_context = yaml.safe_load(
|
||||
tools.utils.SHARED_WORKFLOW_CONTEXT_FILEPATH.read_text()
|
||||
)
|
||||
shared_context = yaml.safe_load(shared_context_file.read_text())
|
||||
for key, value in shared_context.items():
|
||||
context[key] = value
|
||||
loaded_template = env.get_template(template_path.name)
|
||||
|
|
|
@ -38,6 +38,9 @@ SPB_ENVIRONMENT = os.environ.get("SPB_ENVIRONMENT") or "prod"
|
|||
STAGING_BUCKET_NAME = f"salt-project-{SPB_ENVIRONMENT}-salt-artifacts-staging"
|
||||
RELEASE_BUCKET_NAME = f"salt-project-{SPB_ENVIRONMENT}-salt-artifacts-release"
|
||||
BACKUP_BUCKET_NAME = f"salt-project-{SPB_ENVIRONMENT}-salt-artifacts-backup"
|
||||
SHARED_WORKFLOW_CONTEXT_FILEPATH = (
|
||||
REPO_ROOT / "cicd" / "shared-gh-workflows-context.yml"
|
||||
)
|
||||
|
||||
|
||||
class UpdateProgress:
|
||||
|
|
Loading…
Add table
Reference in a new issue