diff --git a/generated/gha/dagster-cloud.pex b/generated/gha/dagster-cloud.pex index b19453e..9e606d5 100755 Binary files a/generated/gha/dagster-cloud.pex and b/generated/gha/dagster-cloud.pex differ diff --git a/scripts/Dockerfile.dagster-cloud-pex-builder b/scripts/Dockerfile.dagster-cloud-pex-builder new file mode 100644 index 0000000..f46cd37 --- /dev/null +++ b/scripts/Dockerfile.dagster-cloud-pex-builder @@ -0,0 +1,16 @@ +# Builds generated/gha/dagster-cloud.pex + +# Use an official manylinux builder (https://github.com/pypa/manylinux#docker-images) +FROM --platform=linux/amd64 quay.io/pypa/manylinux_2_28_x86_64:latest + +# Add all the relevant Python binaries to the PATH +ENV PATH="/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin:/opt/python/cp310-cp310/bin:/opt/python/cp311-cp311/bin:/opt/python/cp311-cp312/bin:$PATH" + +# pins? +RUN python3.11 -m pip install typer rich pex + +COPY release.py release.py + +RUN mkdir -p /generated + +CMD ["python3.11", "release.py", "build-dagster-cloud-pex"] diff --git a/scripts/release.py b/scripts/release.py index 5d71baf..cecf4f6 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -82,7 +82,7 @@ def build_docker_action(version_tag: str, publish_docker_action: bool = True): @app.command(help="Build dagster-cloud.pex") -def update_dagster_cloud_pex( +def build_dagster_cloud_pex( dagster_internal_branch: Optional[str] = DAGSTER_INTERNAL_BRANCH_OPTION, dagster_oss_branch: Optional[str] = DAGSTER_OSS_BRANCH_OPTION, ): @@ -123,13 +123,13 @@ def update_dagster_cloud_pex( "PyGithub", "-o=dagster-cloud.pex", *platform_args, - "--platform=macosx_12_0_x86_64-cp-311-cp311", - "--platform=macosx_12_0_arm64-cp-311-cp311", + # For arm64 github runners + "--platform=manylinux_2_17_aarch64-cp-312-cp312", "--pip-version=23.0", "--resolver-version=pip-2020-resolver", "--venv=prepend", "--python-shebang=/usr/bin/env python", - "-v", + "-vvvvv", ] print(f"Running {args}") output = subprocess.check_output( @@ -142,6 +142,43 @@ def update_dagster_cloud_pex( info("Built generated/gha/dagster-cloud.pex") +@app.command(help="Update dagster-cloud.pex") +def update_dagster_cloud_pex( + dagster_internal_branch: Optional[str] = DAGSTER_INTERNAL_BRANCH_OPTION, + dagster_oss_branch: Optional[str] = DAGSTER_OSS_BRANCH_OPTION, +): + map_folders = {"/generated": os.path.join(os.path.dirname(__file__), "..", "generated")} + + mount_args = [] + for target_folder, source_folder in map_folders.items(): + mount_args.extend(["--mount", f"type=bind,source={source_folder},target={target_folder}"]) + + cmd = [ + "docker", + "build", + "--progress=plain", + "-t", + "dagster-cloud-pex-builder", + "--platform=linux/amd64", + "-f", + os.path.join(os.path.dirname(__file__), "Dockerfile.dagster-cloud-pex-builder"), + os.path.dirname(__file__), + ] + + subprocess.run(cmd, check=True) + + # Map generated to generated on docker image and build! + cmd = [ + "docker", + "run", + "--platform=linux/amd64", + *mount_args, + "-t", + "dagster-cloud-pex-builder", + ] + subprocess.run(cmd, check=True) + + @app.command() def update_docker_action_references( previous_version_tag,