Skip to content

fix redundancy verify #170

fix redundancy verify

fix redundancy verify #170

name: Profiles/KFAM Integration Tests
on:
pull_request:
paths:
- components/profile-controller/**
- components/access-management/**
branches:
- master
- v*-branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
cancel-in-progress: true
env:
PROFILE_IMG: profile-controller
KFAM_IMG: kfam
TAG: intergration-test
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Profile Controller Image
run: |
cd components/profile-controller
make docker-build-multi-arch IMG="${PROFILE_IMG}"
- name: Build Kfam Image
run: |
cd components/access-management
make docker-build-multi-arch IMG="${KFAM_IMG}"
- name: Install KinD
run: ./components/testing/gh-actions/install_kind.sh
- name: Create KinD Cluster
run: kind create cluster --config components/testing/gh-actions/kind-1-25.yaml
- name: Load Images into KinD Cluster
run: |
kind load docker-image "${PROFILE_IMG}:${TAG}"
kind load docker-image "${KFAM_IMG}:${TAG}"
- name: Install kustomize
run: ./components/testing/gh-actions/install_kustomize.sh
- name: Install Istio
run: ./components/testing/gh-actions/install_istio.sh
- name: Build & Apply manifests
run: |
cd components/profile-controller/config
kubectl create ns kubeflow
export CURRENT_PROFILE_IMAGE="docker.io/kubeflownotebookswg/${PROFILE_IMG}"
export PR_PROFILE_IMAGE="${PROFILE_IMG}:${TAG}"
export CURRENT_KFAM_IMAGE="docker.io/kubeflownotebookswg/${KFAM_IMG}"
export PR_KFAM_IMAGE="${KFAM_IMG}:${TAG}"
# escape "." in the image names, as it is a special characters in sed
export CURRENT_PROFILE_IMAGE=$(echo "$CURRENT_PROFILE_IMAGE" | sed 's|\.|\\.|g')
export PR_PROFILE_IMAGE=$(echo "$PR_PROFILE_IMAGE" | sed 's|\.|\\.|g')
export CURRENT_KFAM_IMAGE=$(echo "$CURRENT_KFAM_IMAGE" | sed 's|\.|\\.|g')
export PR_KFAM_IMAGE=$(echo "$PR_KFAM_IMAGE" | sed 's|\.|\\.|g')
kustomize build overlays/kubeflow \
| sed "s|${CURRENT_PROFILE_IMAGE}:[a-zA-Z0-9_.-]*|${PR_PROFILE_IMAGE}|g" \
| sed "s|${CURRENT_KFAM_IMAGE}:[a-zA-Z0-9_.-]*|${PR_KFAM_IMAGE}|g" \
| kubectl apply -f -
kubectl wait pods -n kubeflow -l kustomize.component=profiles --for=condition=Ready --timeout=300s