Skip to content

Workflow Manual Run #40

Workflow Manual Run

Workflow Manual Run #40

name: Workflow Manual Run
on:
workflow_dispatch:
inputs:
workflow-path:
description: "Specify the workflow path to run"
required: true
default: "transforms/universal/noop"
kfp_v2:
description: "1 if kfp version v2 should be used. Otherwise false."
required: false
default: "0"
debug:
description: "True if use debug mode."
required: false
default: "false"
jobs:
test-kfp-workflow-run:
env:
KFPv2: ${{ github.event.inputs.kfp_v2 }}
WORKFLOW_PATH: ${{ github.event.inputs.workflow-path }}
DEBUG_MODE: ${{ github.event.inputs.debug }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Free up space in github runner
# Free space as indicated here : https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
run: |
df -h
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
df -h
- name: Test KFP worflow run
timeout-minutes: 120
run: |
export K8S_SETUP_SCRIPTS=$PWD/scripts/k8s-setup
source $K8S_SETUP_SCRIPTS/requirements.env
export PATH=$PATH:/tmp/
curl -Lo /tmp/kind https://kind.sigs.k8s.io/dl/v${KIND_VERSION}/kind-linux-amd64
chmod 777 /tmp/kind
curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 /tmp/get_helm.sh
HELM_INSTALL_DIR=/tmp/ /tmp/get_helm.sh -v v${HELM_VERSION} --no-sudo
chmod 777 /tmp/helm
curl -L https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /tmp/kubectl
chmod 777 /tmp/kubectl
curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o /tmp/mc
chmod +x /tmp/mc
make -C $K8S_SETUP_SCRIPTS setup
debug_mode=$(echo "$DEBUG_MODE" | tr '[:upper:]' '[:lower:]')
if [ "$debug_mode" == "true" ]; then
make -C $WORKFLOW_PATH workflow-test || true
kubectl describe pod -A
kubectl get pods -A
else
make -C $WORKFLOW_PATH workflow-test
fi