Skip to content

Commit

Permalink
Migrated kubeflow-pipeline-upgrade-test to GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: hbelmiro <helber.belmiro@gmail.com>
  • Loading branch information
hbelmiro committed Jun 23, 2024
1 parent 991a610 commit ebfb8f4
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 68 deletions.
21 changes: 21 additions & 0 deletions .github/actions/kfp-cluster/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Set up KFP on KinD"
description: "Step to start and configure KFP on KinD"

runs:
using: "composite"
steps:
- name: Create k8s Kind Cluster
uses: container-tools/kind-action@v2
with:
cluster_name: kfp
kubectl_version: v1.29.2
version: v0.22.0
node_image: kindest/node:v1.29.2

- name: Build images
shell: bash
run: ./scripts/deploy/github/build-images.sh

- name: Deploy KFP
shell: bash
run: ./scripts/deploy/github/deploy-kfp.sh
13 changes: 2 additions & 11 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,12 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create k8s Kind Cluster
uses: container-tools/kind-action@v2
with:
cluster_name: kfp-tekton
kubectl_version: v1.29.2
version: v0.22.0
node_image: kindest/node:v1.29.2
- name: build images
run: ./scripts/deploy/github/build-images.sh
- name: Create KFP cluster
uses: ./.github/actions/kfp-cluster
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: "deploy kfp-tekton"
run: ./scripts/deploy/github/deploy-kfp.sh
- name: Install sdk
run: |
python3 -m venv .venv
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Create k8s Kind Cluster
uses: container-tools/kind-action@v2
with:
cluster_name: kfp
kubectl_version: v1.29.2
version: v0.22.0
node_image: kindest/node:v1.29.2

- name: Build images
run: ./scripts/deploy/github/build-images.sh

- name: Deploy KFP
run: ./scripts/deploy/github/deploy-kfp.sh
- name: Create KFP cluster
uses: ./.github/actions/kfp-cluster

- name: Forward API port
run: ./scripts/deploy/github/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/upgrade-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: KFP upgrade tests

on:
push:
branches: [master]

pull_request:
paths:
- '.github/workflows/upgrade-test.yml'
- 'backend/**'
- 'manifests/kustomize/**'

jobs:
upgrade-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create KFP cluster
uses: ./.github/actions/kfp-cluster

- name: Prepare upgrade tests
working-directory: backend/test/integration
run: go test -v ./... -namespace ${NAMESPACE} -args -runUpgradeTests=true -testify.m=Prepare

- name: Prepare verification tests
working-directory: backend/test/integration
run: go test -v ./... -namespace ${NAMESPACE} -args -runUpgradeTests=true -testify.m=Verify
42 changes: 0 additions & 42 deletions test/e2e_test_gke_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,48 +37,6 @@ spec:
- name: namespace
value: kubeflow
templates:
- name: upgrade-test-preparation
inputs:
parameters:
- name: target-image-prefix
- name: test-results-gcs-dir
- name: api-integration-test-image-suffix
steps:
- - name: build-api-integration-test-image
template: build-image
arguments:
parameters:
- name: docker-path
value: .
- name: docker-file
value: test/api-integration-test/Dockerfile
- name: image-name
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.api-integration-test-image-suffix}}"
- - name: run-upgrade-tests-preparation
template: run-upgrade-tests-preparation
arguments:
parameters:
- name: test-results-gcs-dir
value: "{{inputs.parameters.test-results-gcs-dir}}"
- name: api-integration-test-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.api-integration-test-image-suffix}}"

- name: upgrade-test-verification
inputs:
parameters:
- name: target-image-prefix
- name: test-results-gcs-dir
- name: api-integration-test-image-suffix
steps:
- - name: run-upgrade-tests-verification
template: run-upgrade-tests-verification
arguments:
parameters:
- name: test-results-gcs-dir
value: "{{inputs.parameters.test-results-gcs-dir}}"
- name: api-integration-test-image
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.api-integration-test-image-suffix}}"

- name: upgrade-test-preparation-v2
inputs:
parameters:
Expand Down
4 changes: 2 additions & 2 deletions test/upgrade-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ if [ -n "$TEST_V2_API" ]; then
TEST_PREPARATION_ENTRYPOINT=upgrade-test-preparation-v2
TEST_VERIFICATION_ENTRYPOINT=upgrade-test-verification-v2
else
TEST_PREPARATION_ENTRYPOINT=upgrade-test-preparation
TEST_VERIFICATION_ENTRYPOINT=upgrade-test-verification
>&2 echo "Error: Upgrade test for v1 is no longer supported. This is currently handled by GitHub Actions."
exit 1
fi


Expand Down

0 comments on commit ebfb8f4

Please sign in to comment.