From 4ba35b2a87b42122101c2137d0735484c2233e2a Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Mon, 23 Dec 2024 23:34:27 +0800 Subject: [PATCH] Install required package in CI --- .github/workflows/check-task-migration.yaml | 10 ++++++++-- hack/validate-migration.sh | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-task-migration.yaml b/.github/workflows/check-task-migration.yaml index 6ca4107e8..a117721d8 100644 --- a/.github/workflows/check-task-migration.yaml +++ b/.github/workflows/check-task-migration.yaml @@ -4,16 +4,22 @@ name: Check task migrations branches: [main] jobs: check: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Create k8s Kind Cluster - uses: helm/kind-action@v1 + uses: helm/kind-action@v1.12.0 + with: + cluster_name: kind + - uses: tektoncd/actions/setup-tektoncd@main + with: + pipeline_version: latest - name: Run check run: | + kubectl get all -n tekton-pipelines # Require name main git branch main origin/main # Make `git branch --show-current` works. diff --git a/hack/validate-migration.sh b/hack/validate-migration.sh index ec43d14bf..e3f5bdda7 100755 --- a/hack/validate-migration.sh +++ b/hack/validate-migration.sh @@ -62,7 +62,7 @@ preprocess_pipelines() { done <<<"$pushed_pipelines" mkdir -p "${WORK_DIR}/pipelines/local" - oc kustomize --output "${WORK_DIR}/pipelines/local" pipelines/ + kubectl kustomize --output "${WORK_DIR}/pipelines/local" pipelines/ local -r names="${pl_names_in_config[*]}" read -r hexdigits _ < <(sha256sum "${BASH_SOURCE[0]}") @@ -216,7 +216,7 @@ check_version_match() { if is_normal_task "$task_dir" "$task_name" ; then task_version=$(yq "$label" "${task_dir}/${task_name}.yaml") elif is_kustomized_task "$task_dir" "$task_name"; then - task_version=$(oc kustomize "$task_dir" | yq "$label") + task_version=$(kubectl kustomize "$task_dir" | yq "$label") else exit 1 fi