Skip to content

chore: add shas for ubi images #4

chore: add shas for ubi images

chore: add shas for ubi images #4

name: KinD DSPO/DSP Integration Tests
on:
workflow_dispatch:
pull_request:
paths:
- go.mod
- go.sum
- controllers/**
- api/**
- config/**
- tests/**
types:
- opened
- reopened
- closed
- synchronize
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
IMAGE_REPO_DSPO: data-science-pipelines-operator
DSPA_NAMESPACE: test-dspa
DSPA_EXTERNAL_NAMESPACE: test-dspa-external
MINIO_NAMESPACE: test-minio
MARIADB_NAMESPACE: test-mariadb
DSPA_NAME: test-dspa
DSPA_EXTERNAL_NAME: test-dspa-external
DSPA_DEPLOY_WAIT_TIMEOUT: 300
INTEGRATION_TESTS_DIR: ${{ github.workspace }}/tests
DSPA_PATH: ${{ github.workspace }}/tests/resources/dspa-lite.yaml
DSPA_EXTERNAL_PATH: ${{ github.workspace }}/tests/resources/dspa-external-lite.yaml
jobs:
dspo-tests:
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: '1.19.x'
id: go
- name: Setup and start KinD cluster
uses: ./.github/actions/kind
# TODO: Consolidate testing CRDS (2 locations)
- name: Apply OCP CRDs
env:
RESOURCES_DIR: ${{ github.workspace }}/.github/resources
CONFIG_DIR: ${{ github.workspace }}/config
run: |
kubectl apply -f ${{ env.RESOURCES_DIR }}/crds
kubectl apply -f ${{ env.CONFIG_DIR }}/crd/external/route.openshift.io_routes.yaml
- name: Build image
env:
DSPO_IMAGE: ${{env.REGISTRY_ADDRESS}}/data-science-pipelines-operator
run: |
make podman-build -e IMG="${DSPO_IMAGE}"
- name: Create opendatahub namespace
run: |
kubectl create namespace opendatahub
- name: Deploy Argo Lite
working-directory: ${{ github.workspace }}/.github/resources/argo-lite
run: |
kustomize build . | kubectl apply -f -
- name: Deploy DSPO
env:
DSPO_IMAGE: ${{env.REGISTRY_ADDRESS}}/data-science-pipelines-operator
run: |
make podman-push -e IMG="${DSPO_IMAGE}"
make deploy-kind -e IMG="${DSPO_IMAGE}"
- name: Create Minio Namespace
run: |
kubectl create namespace ${{ env.MINIO_NAMESPACE }}
- name: Deploy Minio
working-directory: ${{ github.workspace }}/.github/resources/minio
run: |
kustomize build . | oc -n ${{ env.MINIO_NAMESPACE }} apply -f -
- name: Create MariaDB Namespace
run: |
kubectl create namespace ${{ env.MARIADB_NAMESPACE }}
- name: Deploy MariaDB
working-directory: ${{ github.workspace }}/.github/resources/mariadb
run: |
kustomize build . | oc -n ${{ env.MARIADB_NAMESPACE }} apply -f -
- name: Wait for Dependencies (DSPO, Minio, Mariadb)
run: |
kubectl wait -n opendatahub --timeout=60s --for=condition=Available=true deployment data-science-pipelines-operator-controller-manager
kubectl wait -n ${{ env.MARIADB_NAMESPACE }} --timeout=60s --for=condition=Available=true deployment mariadb
kubectl wait -n ${{ env.MINIO_NAMESPACE }} --timeout=60s --for=condition=Available=true deployment minio
- name: Create DSPA Namespace
run: |
kubectl create namespace ${{ env.DSPA_NAMESPACE }}
- name: Create Namespace for DSPA with External connections
run: |
kubectl create namespace ${{ env.DSPA_EXTERNAL_NAMESPACE }}
- name: Create Minio Secrets
run: |
kubectl create secret generic minio --from-literal=accesskey=accesskey --from-literal=secretkey=secretkey -n ${{ env.DSPA_EXTERNAL_NAMESPACE }}
- name: Create MariaDB Secrets
run: |
password=$(kubectl get secret ds-pipeline-db-test -n test-mariadb -o jsonpath="{.data.password}" | base64 --decode)
kubectl create secret generic ds-pipeline-db-test --from-literal=password="$password" -n ${{ env.DSPA_EXTERNAL_NAMESPACE }}
- name: Run tests
working-directory: ${{ github.workspace }}
env:
NAMESPACE: ${{ env.DSPA_NAMESPACE }}
DSPA_NAME: ${{ env.DSPA_NAME }}
DSPA_PATH: ${{ env.DSPA_PATH }}
run: |
make integrationtest K8SAPISERVERHOST=$(oc whoami --show-server) DSPANAMESPACE=${NAMESPACE} DSPAPATH=${DSPA_PATH}
- name: Run tests for DSPA with External Connections
working-directory: ${{ github.workspace }}
env:
NAMESPACE: ${{ env.DSPA_EXTERNAL_NAMESPACE }}
DSPA_NAME: ${{ env.DSPA_EXTERNAL_NAME }}
DSPA_EXTERNAL_PATH: ${{ env.DSPA_EXTERNAL_PATH }}
run: |
make integrationtest K8SAPISERVERHOST=$(oc whoami --show-server) DSPANAMESPACE=${NAMESPACE} DSPAPATH=${DSPA_EXTERNAL_PATH}
- name: Clean up
run: |
make undeploy-kind