From 65ae60083527f5b0f19c54b428a1f0747999858d Mon Sep 17 00:00:00 2001 From: khluu Date: Thu, 7 May 2026 18:03:55 -0700 Subject: [PATCH] Drop nightly Docker image flow; image builds are release-only Wheels still build on every commit (existing nightly wheel flow), but Docker images are now version-tagged releases only. Remove: - the NIGHTLY conditional on the build/publish block steps - the nightly DockerHub publish step - push-nightly-builds.sh and cleanup-nightly-builds.sh The image flow now: manual unblock -> build per-arch images -> manual unblock with release-version -> publish-release-images.sh tags vllm/vllm-omni:vX.Y.Z + latest on DockerHub. Co-Authored-By: Claude Opus 4.7 (1M context) --- .buildkite/release-pipeline.yaml | 66 +++------- .buildkite/scripts/cleanup-nightly-builds.sh | 129 ------------------- .buildkite/scripts/push-nightly-builds.sh | 30 ----- 3 files changed, 21 insertions(+), 204 deletions(-) delete mode 100755 .buildkite/scripts/cleanup-nightly-builds.sh delete mode 100755 .buildkite/scripts/push-nightly-builds.sh diff --git a/.buildkite/release-pipeline.yaml b/.buildkite/release-pipeline.yaml index ac7595f8a..5f2dbdf0d 100644 --- a/.buildkite/release-pipeline.yaml +++ b/.buildkite/release-pipeline.yaml @@ -29,7 +29,6 @@ steps: - block: "Unblock to build release Docker images" depends_on: ~ key: block-build-release-images - if: build.env("NIGHTLY") != "1" - group: "Build release Docker images" key: "build-release-images" @@ -73,48 +72,25 @@ steps: env: DOCKER_BUILDKIT: "1" - - group: "Publish release images" - key: "publish-release-images" - steps: - - label: "Publish nightly multi-arch image to DockerHub" - depends_on: - - build-release-image-x86 - - build-release-image-arm64 - if: build.env("NIGHTLY") == "1" - agents: - queue: small_cpu_queue_release - commands: - - "bash .buildkite/scripts/push-nightly-builds.sh" - # Clean up old nightly builds (keep only last 14) - - "bash .buildkite/scripts/cleanup-nightly-builds.sh" - plugins: - - docker-login#v3.0.0: - username: vllmbot - password-env: DOCKERHUB_TOKEN - env: - DOCKER_BUILDKIT: "1" - DOCKERHUB_USERNAME: "vllmbot" + - block: "Publish release images to DockerHub" + key: block-publish-release-images + depends_on: + - build-release-image-x86 + - build-release-image-arm64 + - input-release-version - - block: "Publish release images to DockerHub" - key: block-publish-release-images - depends_on: - - build-release-image-x86 - - build-release-image-arm64 - - input-release-version - if: build.env("NIGHTLY") != "1" - - - label: "Publish release images to DockerHub" - depends_on: - - block-publish-release-images - key: publish-release-images-dockerhub - agents: - queue: small_cpu_queue_release - commands: - - "bash .buildkite/scripts/publish-release-images.sh" - plugins: - - docker-login#v3.0.0: - username: vllmbot - password-env: DOCKERHUB_TOKEN - env: - DOCKER_BUILDKIT: "1" - DOCKERHUB_USERNAME: "vllmbot" + - label: "Publish release images to DockerHub" + depends_on: + - block-publish-release-images + key: publish-release-images-dockerhub + agents: + queue: small_cpu_queue_release + commands: + - "bash .buildkite/scripts/publish-release-images.sh" + plugins: + - docker-login#v3.0.0: + username: vllmbot + password-env: DOCKERHUB_TOKEN + env: + DOCKER_BUILDKIT: "1" + DOCKERHUB_USERNAME: "vllmbot" diff --git a/.buildkite/scripts/cleanup-nightly-builds.sh b/.buildkite/scripts/cleanup-nightly-builds.sh deleted file mode 100755 index ae9571b57..000000000 --- a/.buildkite/scripts/cleanup-nightly-builds.sh +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/bash - -set -ex - -# Clean up old nightly builds from DockerHub, keeping only the last 14 builds. -# Uses the DockerHub API to list and delete old tags with the given prefix. -# Usage: cleanup-nightly-builds.sh [TAG_PREFIX] [REPO] -# Example: cleanup-nightly-builds.sh "nightly-" -# Example: cleanup-nightly-builds.sh "nightly-" "vllm/vllm-omni" - -# Get tag prefix and repo from arguments -TAG_PREFIX="${1:-nightly-}" -REPO="${2:-vllm/vllm-omni}" - -echo "Cleaning up tags with prefix: $TAG_PREFIX in repository: $REPO" - -# DockerHub API endpoint for the repository -REPO_API_URL="https://hub.docker.com/v2/repositories/${REPO}/tags" - -# Get DockerHub credentials from environment -if [ -z "$DOCKERHUB_TOKEN" ]; then - echo "Error: DOCKERHUB_TOKEN environment variable is not set" - exit 1 -fi - -if [ -z "$DOCKERHUB_USERNAME" ]; then - echo "Error: DOCKERHUB_USERNAME environment variable is not set" - exit 1 -fi - -# Get DockerHub bearer token -echo "Getting DockerHub bearer token..." -set +x -BEARER_TOKEN=$(curl -s -X POST \ - -H "Content-Type: application/json" \ - -d "{\"username\": \"$DOCKERHUB_USERNAME\", \"password\": \"$DOCKERHUB_TOKEN\"}" \ - "https://hub.docker.com/v2/users/login" | jq -r '.token') -set -x - -if [ -z "$BEARER_TOKEN" ] || [ "$BEARER_TOKEN" = "null" ]; then - echo "Error: Failed to get DockerHub bearer token" - exit 1 -fi - -# Function to get all tags from DockerHub -get_all_tags() { - local page=1 - local all_tags="" - - while true; do - set +x - local response=$(curl -s -H "Authorization: Bearer $BEARER_TOKEN" \ - "$REPO_API_URL?page=$page&page_size=100") - set -x - - # Get both last_updated timestamp and tag name, separated by | - local tags=$(echo "$response" | jq -r --arg prefix "$TAG_PREFIX" '.results[] | select(.name | startswith($prefix)) | "\(.last_updated)|\(.name)"') - - if [ -z "$tags" ]; then - break - fi - - all_tags="$all_tags$tags"$'\n' - page=$((page + 1)) - done - - # Sort by timestamp (newest first) and extract just the tag names - echo "$all_tags" | sort -r | cut -d'|' -f2 -} - -delete_tag() { - local tag_name="$1" - echo "Deleting tag: $tag_name" - - local delete_url="https://hub.docker.com/v2/repositories/${REPO}/tags/$tag_name" - set +x - local response=$(curl -s -X DELETE -H "Authorization: Bearer $BEARER_TOKEN" "$delete_url") - set -x - - if echo "$response" | jq -e '.detail' > /dev/null 2>&1; then - echo "Warning: Failed to delete tag $tag_name: $(echo "$response" | jq -r '.detail')" - else - echo "Successfully deleted tag: $tag_name" - fi -} - -# Get all nightly- prefixed tags, sorted by last_updated timestamp (newest first) -echo "Fetching all tags from DockerHub..." -all_tags=$(get_all_tags) - -if [ -z "$all_tags" ]; then - echo "No tags found to clean up" - exit 0 -fi - -# Count total tags -total_tags=$(echo "$all_tags" | wc -l) -echo "Found $total_tags tags" - -# Keep only the last 14 builds (including the current one) -tags_to_keep=14 -tags_to_delete=$((total_tags - tags_to_keep)) - -if [ $tags_to_delete -le 0 ]; then - echo "No tags need to be deleted (only $total_tags tags found, keeping $tags_to_keep)" - exit 0 -fi - -echo "Will delete $tags_to_delete old tags, keeping the newest $tags_to_keep" - -# Get tags to delete (skip the first $tags_to_keep tags) -tags_to_delete_list=$(echo "$all_tags" | tail -n +$((tags_to_keep + 1))) - -if [ -z "$tags_to_delete_list" ]; then - echo "No tags to delete" - exit 0 -fi - -# Delete old tags -echo "Deleting old tags..." -while IFS= read -r tag; do - if [ -n "$tag" ]; then - delete_tag "$tag" - # Add a small delay to avoid rate limiting - sleep 1 - fi -done <<< "$tags_to_delete_list" - -echo "Cleanup completed successfully" diff --git a/.buildkite/scripts/push-nightly-builds.sh b/.buildkite/scripts/push-nightly-builds.sh deleted file mode 100755 index 6dbaf3e4b..000000000 --- a/.buildkite/scripts/push-nightly-builds.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -set -ex - -# Pull per-arch images from ECR (built earlier in the pipeline) and re-publish -# them to Docker Hub under a nightly tag, then create and push a multi-arch -# manifest pointing at both per-arch tags. - -ORIG_TAG_NAME="$BUILDKITE_COMMIT" -TAG_NAME="nightly" -DOCKERHUB_REPO="vllm/vllm-omni" -ECR_REPO="public.ecr.aws/q9t5s3a7/vllm-omni-release-repo" - -echo "Pushing original tag $ORIG_TAG_NAME to new nightly tag name: $TAG_NAME" - -# pull original arch-dependent images from AWS ECR Public -aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/q9t5s3a7 -docker pull "$ECR_REPO:$ORIG_TAG_NAME-x86_64" -docker pull "$ECR_REPO:$ORIG_TAG_NAME-aarch64" -# tag arch-dependent images -docker tag "$ECR_REPO:$ORIG_TAG_NAME-x86_64" "$DOCKERHUB_REPO:$TAG_NAME-x86_64" -docker tag "$ECR_REPO:$ORIG_TAG_NAME-aarch64" "$DOCKERHUB_REPO:$TAG_NAME-aarch64" -# push arch-dependent images to DockerHub -docker push "$DOCKERHUB_REPO:$TAG_NAME-x86_64" -docker push "$DOCKERHUB_REPO:$TAG_NAME-aarch64" -# push arch-independent manifest to DockerHub -docker manifest create "$DOCKERHUB_REPO:$TAG_NAME" "$DOCKERHUB_REPO:$TAG_NAME-x86_64" "$DOCKERHUB_REPO:$TAG_NAME-aarch64" --amend -docker manifest create "$DOCKERHUB_REPO:$TAG_NAME-$BUILDKITE_COMMIT" "$DOCKERHUB_REPO:$TAG_NAME-x86_64" "$DOCKERHUB_REPO:$TAG_NAME-aarch64" --amend -docker manifest push "$DOCKERHUB_REPO:$TAG_NAME" -docker manifest push "$DOCKERHUB_REPO:$TAG_NAME-$BUILDKITE_COMMIT"