Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from kubeflow:main #28

Merged
merged 10 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build-and-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ on:
- '.github/dependabot.yml'
- 'docs/**'
env:
QUAY_ORG: opendatahub
QUAY_IMG_REPO: model-registry
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
IMG_ORG: kubeflow
IMG_REPO: model-registry
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PWD: ${{ secrets.DOCKERHUB_TOKEN }}
PUSH_IMAGE: true
jobs:
build-image:
Expand Down Expand Up @@ -50,8 +50,8 @@ jobs:
if: env.BUILD_CONTEXT == 'main'
shell: bash
env:
IMG: quay.io/${{ env.QUAY_ORG }}/${{ env.QUAY_IMG_REPO }}
BUILD_IMAGE: false
IMG: ${{ env.IMG_ORG }}/${{ env.IMG_REPO }}
BUILD_IMAGE: false # image is already built in "Build and Push Image" step
run: |
docker tag ${{ env.IMG }}:$VERSION ${{ env.IMG }}:latest
# BUILD_IMAGE=false skip the build, just push the tag made above
Expand All @@ -60,8 +60,8 @@ jobs:
if: env.BUILD_CONTEXT == 'main'
shell: bash
env:
IMG: quay.io/${{ env.QUAY_ORG }}/${{ env.QUAY_IMG_REPO }}
BUILD_IMAGE: false
IMG: ${{ env.IMG_ORG }}/${{ env.IMG_REPO }}
BUILD_IMAGE: false # image is already built in "Build and Push Image" step
run: |
docker tag ${{ env.IMG }}:$VERSION ${{ env.IMG }}:main
# BUILD_IMAGE=false skip the build, just push the tag made above
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/build-image-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ on:
- 'docs/**'
- 'clients/python/**'
env:
QUAY_IMG_REPO: model-registry
IMG_ORG: kubeflow
IMG_REPO: model-registry
PUSH_IMAGE: false
BRANCH: ${{ github.base_ref }}
jobs:
Expand All @@ -31,3 +32,30 @@ jobs:
env:
VERSION: ${{ steps.tags.outputs.tag }}
run: ./scripts/build_deploy.sh
- name: Start Kind Cluster
uses: helm/[email protected]
- name: Load Local Registry Test Image
env:
IMG: "${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
run: |
kind load docker-image -n chart-testing ${IMG}
- name: Create Test Registry
env:
IMG: "${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"
run: |
echo "Download kustomize 5.2.1"
mkdir $GITHUB_WORKSPACE/kustomize
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s "5.2.1" "$GITHUB_WORKSPACE/kustomize"
PATH=$GITHUB_WORKSPACE/kustomize:$PATH
echo "Display Kustomize version"
kustomize version
echo "Deploying Model Registry using Manifests; branch ${BRANCH}"
kubectl create namespace kubeflow
cd manifests/kustomize/overlays/db
kustomize edit set image kubeflow/model-registry:latest $IMG
kustomize build | kubectl apply -f -
- name: Wait for Test Registry Deployment
run: |
kubectl wait --for=condition=available -n kubeflow deployment/model-registry-db --timeout=5m
kubectl wait --for=condition=available -n kubeflow deployment/model-registry-deployment --timeout=5m
kubectl logs -n kubeflow deployment/model-registry-deployment
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ MLMD_VERSION ?= 1.14.0
DOCKER ?= docker
# default Dockerfile
DOCKERFILE ?= Dockerfile
# container registry
IMG_REGISTRY ?= quay.io
# container registry, default to empty (dockerhub) if not explicitly set
IMG_REGISTRY ?=
# container image organization
IMG_ORG ?= opendatahub
IMG_ORG ?= kubeflow
# container image version
IMG_VERSION ?= main
# container image repository
IMG_REPO ?= model-registry
# container image
IMG ?= ${IMG_REGISTRY}/$(IMG_ORG)/$(IMG_REPO)
ifdef IMG_REGISTRY
IMG := ${IMG_REGISTRY}/${IMG_ORG}/${IMG_REPO}
else
IMG := ${IMG_ORG}/${IMG_REPO}
endif

model-registry: build

Expand Down Expand Up @@ -190,7 +194,12 @@ proxy: build
# login to docker
.PHONY: docker/login
docker/login:
$(DOCKER) login -u "${DOCKER_USER}" -p "${DOCKER_PWD}" "${IMG_REGISTRY}"
ifdef IMG_REGISTRY
$(DOCKER) login -u "${DOCKER_USER}" -p "${DOCKER_PWD}" "${IMG_REGISTRY}"
else
$(DOCKER) login -u "${DOCKER_USER}" -p "${DOCKER_PWD}"
endif


# build docker image
.PHONY: image/build
Expand Down
Loading