feat: Add support for MySQL database, fixes RHOAIENG-3246, RHOAIENG-3247 #62
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test controller image build and deployment | |
on: | |
pull_request: | |
paths-ignore: | |
- 'LICENSE*' | |
- '**.gitignore' | |
- '**.md' | |
- '**.txt' | |
- '.github/ISSUE_TEMPLATE/**' | |
- '.github/dependabot.yml' | |
- 'docs/**' | |
env: | |
QUAY_IMG_REPO: model-registry-operator | |
PUSH_IMAGE: false | |
jobs: | |
build-and-test-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20.10' | |
- name: Generate Tag | |
shell: bash | |
id: tags | |
run: | | |
commit_sha=${{ github.event.after }} | |
tag=main-${commit_sha:0:7} | |
echo "tag=${tag}" >> $GITHUB_OUTPUT | |
- name: Build Image | |
shell: bash | |
env: | |
IMG_VERSION: ${{ steps.tags.outputs.tag }} | |
IMG: "model-registry-operator:${{ steps.tags.outputs.tag }}" | |
run: | | |
make docker-build | |
- name: Start Kind Cluster | |
uses: helm/[email protected] | |
- name: Load Local Test Image | |
env: | |
IMG_VERSION: ${{ steps.tags.outputs.tag }} | |
IMG: "model-registry-operator:${{ steps.tags.outputs.tag }}" | |
run: | | |
kind load docker-image -n chart-testing ${IMG} | |
- name: Deploy Operator Image | |
env: | |
IMG_VERSION: ${{ steps.tags.outputs.tag }} | |
IMG: "model-registry-operator:${{ steps.tags.outputs.tag }}" | |
run: | | |
make deploy | |
- name: Create Test Registry | |
run: | | |
kubectl apply -k config/samples/mysql | |
kubectl get mr | |
- name: Wait for Test Database Deployment | |
timeout-minutes: 5 | |
run: | | |
CONDITION="false" | |
while [ "${CONDITION}" != "True" ] | |
do | |
sleep 5 | |
# debug | |
kubectl get events | |
CONDITION="`kubectl get deployment model-registry-db --output=jsonpath='{.status.conditions[?(@.type=="Available")].status}'`" | |
echo "Database Available=${CONDITION}" | |
done | |
- name: Wait for Test Registry Deployment | |
timeout-minutes: 5 | |
run: | | |
CONDITION="false" | |
while [ "${CONDITION}" != "True" ] | |
do | |
sleep 5 | |
CONDITION="`kubectl get mr modelregistry-sample --output=jsonpath='{.status.conditions[?(@.type=="Available")].status}'`" | |
echo "Registry Available=${CONDITION}" | |
done |