Skip to content

Commit 831a33a

Browse files
committed
Remove more quickstart CI code
1 parent e30a3fe commit 831a33a

File tree

5 files changed

+16
-194
lines changed

5 files changed

+16
-194
lines changed

.github/workflows/release_prepare.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,8 @@ jobs:
227227
matrix:
228228
include:
229229
- cloud: aws
230-
parent_image: 715803424590.dkr.ecr.eu-central-1.amazonaws.com/prepare-release:quickstart-aws
231230
- cloud: azure
232-
parent_image: zenmldocker/prepare-release:quickstart-azure
233231
- cloud: gcp
234-
parent_image: zenmldocker/prepare-release:quickstart-gcp
235232
steps:
236233
# Check out the code
237234
- name: Checkout code
@@ -249,6 +246,4 @@ jobs:
249246
run: |
250247
scripts/qs_run_release_flow.sh \
251248
--cloud "${{ matrix.cloud }}" \
252-
--parent-image "${{ matrix.parent_image }}" \
253-
--new-version "${{ needs.fetch-versions.outputs.new_version }}" \
254-
--branch-ref "${{ github.ref }}"
249+
--new-version "${{ needs.fetch-versions.outputs.new_version }}"

docker/zenml-quickstart-dev.Dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

examples/quickstart/pipelines/simple_pipeline.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
from steps.simple_step import simple_step
66

77
from zenml import pipeline
8-
from zenml.config import CORSConfig, DeploymentSettings, DockerSettings
9-
10-
docker_settings = DockerSettings(
11-
requirements="requirements.txt",
12-
)
8+
from zenml.config import CORSConfig, DeploymentSettings
139

1410
deployment_settings = DeploymentSettings(
1511
app_title="Simple Pipeline",
@@ -19,7 +15,6 @@
1915

2016
@pipeline(
2117
settings={
22-
"docker": docker_settings,
2318
"deployment": deployment_settings,
2419
},
2520
enable_cache=False,

release-cloudbuild-preparation.yaml

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,6 @@ steps:
1010
- USERNAME
1111
- PASSWORD
1212

13-
# Build base image
14-
- name: gcr.io/cloud-builders/docker
15-
args:
16-
- '-c'
17-
- |
18-
docker build . \
19-
--platform linux/amd64 \
20-
-f docker/zenml-dev.Dockerfile \
21-
-t $$USERNAME/prepare-release:base-${_ZENML_NEW_VERSION}
22-
23-
id: build-base
24-
waitFor: ['-']
25-
entrypoint: bash
26-
secretEnv:
27-
- USERNAME
28-
29-
# Push base image
30-
- name: gcr.io/cloud-builders/docker
31-
args:
32-
- '-c'
33-
- docker push $$USERNAME/prepare-release:base-${_ZENML_NEW_VERSION}
34-
id: push-base
35-
waitFor:
36-
- docker-login
37-
- build-base
38-
entrypoint: bash
39-
secretEnv:
40-
- USERNAME
41-
4213
# Build server image
4314
- name: gcr.io/cloud-builders/docker
4415
args:
@@ -68,79 +39,6 @@ steps:
6839
secretEnv:
6940
- USERNAME
7041

71-
# Build Quickstart GCP Image
72-
- name: gcr.io/cloud-builders/docker
73-
args:
74-
- '-c'
75-
- |
76-
docker build . \
77-
--platform linux/amd64 \
78-
--build-arg BASE_IMAGE=$$USERNAME/prepare-release:base-${_ZENML_NEW_VERSION} \
79-
--build-arg CLOUD_PROVIDER=gcp \
80-
-f docker/zenml-quickstart-dev.Dockerfile \
81-
-t $$USERNAME/prepare-release:quickstart-gcp-${_ZENML_NEW_VERSION}
82-
83-
id: build-quickstart-gcp
84-
waitFor:
85-
- push-base
86-
entrypoint: bash
87-
secretEnv:
88-
- USERNAME
89-
90-
# Build Quickstart AWS image
91-
- name: gcr.io/cloud-builders/docker
92-
args:
93-
- '-c'
94-
- |
95-
docker build . \
96-
--platform linux/amd64 \
97-
--build-arg BASE_IMAGE=$$USERNAME/prepare-release:base-${_ZENML_NEW_VERSION} \
98-
--build-arg CLOUD_PROVIDER=aws \
99-
-f docker/zenml-quickstart-dev.Dockerfile \
100-
-t $$USERNAME/prepare-release:quickstart-aws-${_ZENML_NEW_VERSION}
101-
id: build-quickstart-aws
102-
waitFor:
103-
- push-base
104-
entrypoint: bash
105-
secretEnv:
106-
- USERNAME
107-
108-
# Build Quickstart Azure image
109-
- name: gcr.io/cloud-builders/docker
110-
args:
111-
- '-c'
112-
- |
113-
docker build . \
114-
--platform linux/amd64 \
115-
--build-arg BASE_IMAGE=$$USERNAME/prepare-release:base-${_ZENML_NEW_VERSION} \
116-
--build-arg CLOUD_PROVIDER=azure \
117-
-f docker/zenml-quickstart-dev.Dockerfile \
118-
-t $$USERNAME/prepare-release:quickstart-azure-${_ZENML_NEW_VERSION}
119-
id: build-quickstart-azure
120-
waitFor:
121-
- push-base
122-
entrypoint: bash
123-
secretEnv:
124-
- USERNAME
125-
126-
# Push Quickstart images
127-
- name: gcr.io/cloud-builders/docker
128-
args:
129-
- '-c'
130-
- |
131-
docker push $$USERNAME/prepare-release:quickstart-aws-${_ZENML_NEW_VERSION}
132-
docker push $$USERNAME/prepare-release:quickstart-azure-${_ZENML_NEW_VERSION}
133-
docker push $$USERNAME/prepare-release:quickstart-gcp-${_ZENML_NEW_VERSION}
134-
id: push-quickstart
135-
waitFor:
136-
- docker-login
137-
- build-quickstart-gcp
138-
- build-quickstart-aws
139-
- build-quickstart-azure
140-
entrypoint: bash
141-
secretEnv:
142-
- USERNAME
143-
14442
timeout: 3600s
14543
availableSecrets:
14644
secretManager:

scripts/qs_run_release_flow.sh

Lines changed: 14 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,26 @@ usage() {
99
Usage:
1010
scripts/qs_run_release_flow.sh \
1111
--cloud <aws|azure|gcp> \
12-
--parent-image <registry/repo:tag-prefix> \
13-
--new-version <X.Y.Z> \
14-
[--branch-ref <git ref, e.g. refs/heads/misc/prepare-release-X.Y.Z>]
12+
--new-version <X.Y.Z>
1513
1614
Description:
1715
Runs the Quickstart release validation flow:
18-
- Patches the example config's parent_image and requirements to use the branch ref
19-
- Installs dependencies
2016
- Phase 1: Runs the pipeline locally
2117
- Phase 2: Runs the pipeline on the cloud stack
2218
23-
Notes:
24-
--branch-ref is optional. If not provided, the script falls back to $GITHUB_REF.
25-
If neither is available, the script exits with an error.
2619
USAGE
2720
}
2821

2922
# Simple argument parser
3023
CLOUD=""
31-
PARENT_PREFIX=""
3224
NEW_VERSION=""
33-
BRANCH_REF="${BRANCH_REF:-}" # allow environment override if set externally
3425

3526
while [[ $# -gt 0 ]]; do
3627
case "$1" in
3728
--cloud)
3829
CLOUD="${2:-}"; shift 2;;
39-
--parent-image)
40-
PARENT_PREFIX="${2:-}"; shift 2;;
4130
--new-version)
4231
NEW_VERSION="${2:-}"; shift 2;;
43-
--branch-ref)
44-
BRANCH_REF="${2:-}"; shift 2;;
4532
-h|--help)
4633
usage; exit 0;;
4734
*)
@@ -51,36 +38,20 @@ while [[ $# -gt 0 ]]; do
5138
done
5239

5340
# Validate required args
54-
if [[ -z "${CLOUD}" || -z "${PARENT_PREFIX}" || -z "${NEW_VERSION}" ]]; then
55-
echo "Error: --cloud, --parent-image, and --new-version are required." >&2
41+
if [[ -z "${CLOUD}" || -z "${NEW_VERSION}" ]]; then
42+
echo "Error: --cloud and --new-version are required." >&2
5643
usage
5744
exit 1
5845
fi
5946

60-
# Determine branch ref
61-
if [[ -z "${BRANCH_REF}" ]]; then
62-
if [[ -n "${GITHUB_REF:-}" ]]; then
63-
BRANCH_REF="${GITHUB_REF}"
64-
else
65-
echo "Error: --branch-ref not provided and GITHUB_REF is not set. Please supply one of them." >&2
66-
exit 1
67-
fi
68-
fi
6947

7048
echo "=== Quickstart Release Flow ==="
7149
echo "Cloud stack: ${CLOUD}"
72-
echo "Parent image prefix: ${PARENT_PREFIX}"
73-
echo "New version: ${NEW_VERSION}"
74-
echo "Git branch ref: ${BRANCH_REF}"
7550
echo "================================"
7651

7752
# Minimal variables needed for the simplified flow
7853
DIR_PUSHED=0
7954
CLOUD_STACK="${CLOUD}"
80-
CONFIG="configs/training_${CLOUD}.yaml"
81-
REQS="requirements_${CLOUD}.txt"
82-
PARENT_IMAGE="${PARENT_PREFIX}-${NEW_VERSION}"
83-
ZENML_GIT_SPEC="git+https://github.com/zenml-io/zenml.git@${BRANCH_REF}#egg=zenml[server]"
8455

8556
_cleanup() {
8657
# Preserve original exit code from the point of trap invocation
@@ -106,36 +77,24 @@ echo "=== Switching to examples/quickstart directory ==="
10677
pushd examples/quickstart >/dev/null
10778
DIR_PUSHED=1
10879

109-
# Validate required files
110-
if [[ ! -f "${CONFIG}" ]]; then
111-
echo "Error: Config file not found: ${CONFIG}" >&2
112-
exit 1
113-
fi
114-
if [[ ! -f "${REQS}" ]]; then
115-
echo "Error: Requirements file not found: ${REQS}" >&2
116-
exit 1
117-
fi
118-
119-
# Patch config parent_image
120-
echo "=== Patching parent_image in ${CONFIG} to: ${PARENT_IMAGE} ==="
121-
# Replace the entire parent_image line, preserving indentation
122-
sed -i -E "s|^([[:space:]]*parent_image:).*|\1 \"${PARENT_IMAGE}\"|g" "${CONFIG}"
123-
124-
# Patch requirements to install zenml from the provided branch ref
125-
echo "=== Updating ${REQS}: pinning zenml to branch ref ${BRANCH_REF} ==="
126-
# Replace any line that starts with 'zenml[server]' to make the pin robust to different version operators.
127-
sed -i -E "s|^zenml\\[server\\].*|${ZENML_GIT_SPEC}|g" "${REQS}"
128-
129-
# Install dependencies
130-
echo "=== Installing dependencies from ${REQS} ==="
131-
pip install -r "${REQS}"
80+
# Build parent image
81+
docker build -f docker/zenml-dev.Dockerfile -t zenmldocker/zenml:${NEW_VERSION}-py3.12 .
13282

13383
# Phase 1: Run the pipeline locally
13484
echo "=== Phase 1: Run pipeline locally ==="
13585
python run.py
13686

13787
# Phase 2: Run on the cloud stack
13888
echo "=== Phase 2: Run pipeline on cloud stack ==="
89+
90+
if [[ "${CLOUD}" == "aws" ]]; then
91+
zenml integration install aws s3 --uv -y
92+
elif [[ "${CLOUD}" == "azure" ]]; then
93+
zenml integration install azure --uv -y
94+
elif [[ "${CLOUD}" == "gcp" ]]; then
95+
zenml integration install gcp --uv -y
96+
fi
97+
13998
zenml stack set "${CLOUD_STACK}"
14099
python run.py
141100

0 commit comments

Comments
 (0)