Skip to content

Commit

Permalink
v2: update images
Browse files Browse the repository at this point in the history
build and publish v2 images and update manifests to
use these images

Signed-off-by: Yihong Wang <[email protected]>
  • Loading branch information
yhwang committed Aug 1, 2023
1 parent 084744f commit f4ab5fb
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 30 deletions.
1 change: 1 addition & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'go.mod'
- 'backend/**'
- 'scripts/deploy/github/**'
- 'manifests/kustomize/**'

env:
GITHUB_ACTION: "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ resources:

images:
- name: gcr.io/ml-pipeline/api-server
newName: docker.io/aipipeline/apiserver-dev
newTag: e8f6bb3a6
newName: quay.io/aipipeline/apiserver
newTag: 2.0.0
- name: gcr.io/ml-pipeline/persistenceagent
newName: docker.io/aipipeline/persistenceagent-dev
newTag: ba1029b6b
newName: quay.io/aipipeline/persistenceagent
newTag: 2.0.0
- name: gcr.io/ml-pipeline/scheduledworkflow
newName: docker.io/aipipeline/swf-dev
newTag: ba1029b6b
newName: quay.io/aipipeline/scheduledworkflow
newTag: 2.0.0

labels:
- includeSelectors: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ patches:
images:
- name: gcr.io/ml-pipeline/api-server
newName: docker.io/aipipeline/apiserver-dev
newTag: e8f6bb3a6
newName: quay.io/aipipeline/apiserver
newTag: 2.0.0
- name: gcr.io/ml-pipeline/persistenceagent
newName: docker.io/aipipeline/persistenceagent-dev
newTag: ba1029b6b
newName: quay.io/aipipeline/persistenceagent
newTag: 2.0.0
- name: gcr.io/ml-pipeline/scheduledworkflow
newName: docker.io/aipipeline/swf-dev
newTag: ba1029b6b
newName: quay.io/aipipeline/scheduledworkflow
newTag: 2.0.0

labels:
- includeSelectors: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ images:
- name: quay.io/aipipeline/pipelineloop-webhook
newTag: 1.7.1
- name: kfp-v2-dev-driver-controller
newName: docker.io/aipipeline/tekton-driver-dev
newTag: ba1029b6b
newName: quay.io/aipipeline/tekton-driver
newTag: 2.0.0
- name: tekton-exithandler-controller
newName: docker.io/aipipeline/tekton-exithandler-controller-dev
newTag: ba1029b6b
newName: quay.io/aipipeline/tekton-exithandler-controller
newTag: 2.0.0
- name: tekton-exithandler-webhook
newName: docker.io/aipipeline/tekton-exithandler-webhook-dev
newTag: ba1029b6b
newName: quay.io/aipipeline/tekton-exithandler-webhook
newTag: 2.0.0
- name: tekton-kfptask-controller
newName: docker.io/aipipeline/tekton-kfptask-controller-dev
newTag: ba1029b6b
newName: quay.io/aipipeline/tekton-kfptask-controller
newTag: 2.0.0
- name: tekton-kfptask-webhook
newName: docker.io/aipipeline/tekton-kfptask-webhook-dev
newTag: ba1029b6b
newName: quay.io/aipipeline/tekton-kfptask-webhook
newTag: 2.0.0
17 changes: 9 additions & 8 deletions scripts/deploy/github/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@
set -e

REGISTRY="${REGISTRY:-kind-registry:5000}"
TAG="${TAG:-latest}"

docker system prune -a -f

docker build -q -t "${REGISTRY}/apiserver:latest" -f backend/Dockerfile . && docker push "${REGISTRY}/apiserver:latest"
docker build -q -t "${REGISTRY}/persistenceagent:latest" -f backend/Dockerfile.persistenceagent . && docker push "${REGISTRY}/persistenceagent:latest"
docker build -q -t "${REGISTRY}/scheduledworkflow:latest" -f backend/Dockerfile.scheduledworkflow . && docker push "${REGISTRY}/scheduledworkflow:latest"
docker build -q -t "${REGISTRY}/tekton-driver:latest" -f backend/Dockerfile.tektondriver . && docker push "${REGISTRY}/tekton-driver:latest" &
docker build -q -t "${REGISTRY}/tekton-exithandler-controller:latest" -f backend/Dockerfile.tekton-exithandler.controller . && docker push "${REGISTRY}/tekton-exithandler-controller:latest" &
docker build -q -t "${REGISTRY}/tekton-exithandler-webhook:latest" -f backend/Dockerfile.tekton-exithandler.webhook . && docker push "${REGISTRY}/tekton-exithandler-webhook:latest"
docker build -q -t "${REGISTRY}/tekton-kfptask-controller:latest" -f backend/Dockerfile.tekton-kfptask.controller . && docker push "${REGISTRY}/tekton-kfptask-controller:latest" &
docker build -q -t "${REGISTRY}/tekton-kfptask-webhook:latest" -f backend/Dockerfile.tekton-kfptask.webhook . && docker push "${REGISTRY}/tekton-kfptask-webhook:latest" &
docker build -q -t "${REGISTRY}/apiserver:${TAG}" -f backend/Dockerfile . && docker push "${REGISTRY}/apiserver:${TAG}"
docker build -q -t "${REGISTRY}/persistenceagent:${TAG}" -f backend/Dockerfile.persistenceagent . && docker push "${REGISTRY}/persistenceagent:${TAG}"
docker build -q -t "${REGISTRY}/scheduledworkflow:${TAG}" -f backend/Dockerfile.scheduledworkflow . && docker push "${REGISTRY}/scheduledworkflow:${TAG}"
docker build -q -t "${REGISTRY}/tekton-driver:${TAG}" -f backend/Dockerfile.tektondriver . && docker push "${REGISTRY}/tekton-driver:${TAG}" &
docker build -q -t "${REGISTRY}/tekton-exithandler-controller:${TAG}" -f backend/Dockerfile.tekton-exithandler.controller . && docker push "${REGISTRY}/tekton-exithandler-controller:${TAG}" &
docker build -q -t "${REGISTRY}/tekton-exithandler-webhook:${TAG}" -f backend/Dockerfile.tekton-exithandler.webhook . && docker push "${REGISTRY}/tekton-exithandler-webhook:${TAG}"
docker build -q -t "${REGISTRY}/tekton-kfptask-controller:${TAG}" -f backend/Dockerfile.tekton-kfptask.controller . && docker push "${REGISTRY}/tekton-kfptask-controller:${TAG}" &
docker build -q -t "${REGISTRY}/tekton-kfptask-webhook:${TAG}" -f backend/Dockerfile.tekton-kfptask.webhook . && docker push "${REGISTRY}/tekton-kfptask-webhook:${TAG}" &

wait

Expand Down
37 changes: 37 additions & 0 deletions scripts/deploy/github/re-tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
#
# Copyright 2023 kubeflow.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# source: https://raw.githubusercontent.com/open-toolchain/commons/master/scripts/check_registry.sh

# Remove the x if you need no print out of each command
set -e

REGISTRY1="${REGISTRY1:-docker.io/aipipeline}"
REGISTRY2="${REGISTRY2:-quay.io/aipipeline}"
TAG1="${TAG1:-latest}"
TAG2="${TAG2:-latest}"

docker system prune -a -f

declare -a IMAGES=(apiserver persistenceagent scheduledworkflow tekton-driver tekton-exithandler-controller tekton-exithandler-webhook tekton-kfptask-controller tekton-kfptask-webhook)

for IMAGE in "${IMAGES[@]}"; do
docker pull "${REGISTRY1}/${IMAGE}:${TAG1}"
docker tag "${REGISTRY1}/${IMAGE}:${TAG1}" "${REGISTRY2}/${IMAGE}:${TAG2}"
docker push "${REGISTRY2}/${IMAGE}:${TAG2}"
done

# clean up intermittent build caches to free up disk space
docker system prune -a -f

0 comments on commit f4ab5fb

Please sign in to comment.