Skip to content

Commit

Permalink
Update release script container builds (#2891)
Browse files Browse the repository at this point in the history
  • Loading branch information
akchinSTC authored Aug 19, 2022
1 parent e0e2e32 commit ebc8f57
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions create-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,11 @@ def build_release():
# Build wheels and source packages
check_run(["make", "release"], cwd=config.source_dir, capture_output=False)

# Build container images from tagged release
check_run(["git", "checkout", f"tags/v{config.new_version}"], cwd=config.source_dir, capture_output=False)
check_run(["make", "container-images"], cwd=config.source_dir, capture_output=False)
check_run(["git", "checkout", "main"], cwd=config.source_dir, capture_output=False)
if not config.pre_release:
# Build container images from tagged release
check_run(["git", "checkout", f"tags/v{config.new_version}"], cwd=config.source_dir, capture_output=False)
check_run(["make", "container-images"], cwd=config.source_dir, capture_output=False)
check_run(["git", "checkout", "main"], cwd=config.source_dir, capture_output=False)

print("")

Expand Down Expand Up @@ -848,11 +849,12 @@ def publish_release(working_dir) -> None:
print("-----------------------------------------------------------------")
# push container images
print()
print(f"Pushing container images")
is_latest = config.git_branch == "main" and not config.pre_release
check_run(["git", "checkout", f"tags/v{config.new_version}"], cwd=config.source_dir, capture_output=False)
check_run(["make", "publish-container-images", f"IMAGE_IS_LATEST={is_latest}"], cwd=config.source_dir)
check_run(["git", "checkout", "main"], cwd=config.source_dir, capture_output=False)
if not config.pre_release:
print(f"Pushing container images")
is_latest = config.git_branch == "main"
check_run(["git", "checkout", f"tags/v{config.new_version}"], cwd=config.source_dir, capture_output=False)
check_run(["make", "publish-container-images", f"IMAGE_IS_LATEST={is_latest}"], cwd=config.source_dir)
check_run(["git", "checkout", "main"], cwd=config.source_dir, capture_output=False)


def initialize_config(args=None) -> SimpleNamespace:
Expand Down

0 comments on commit ebc8f57

Please sign in to comment.