From c39032cd73fb46fd186e0823b32786ded1b892ed Mon Sep 17 00:00:00 2001 From: Brandon Palm Date: Tue, 2 Jan 2024 11:45:06 -0600 Subject: [PATCH] Add retries for -partner setup calls --- .github/workflows/pre-main.yaml | 44 ++++++++++++++++++++++++--------- .github/workflows/qe-hosted.yml | 23 +++++++++++------ 2 files changed, 48 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pre-main.yaml b/.github/workflows/pre-main.yaml index 4fecb7c0d8..e4c976a99b 100644 --- a/.github/workflows/pre-main.yaml +++ b/.github/workflows/pre-main.yaml @@ -224,15 +224,26 @@ jobs: repository: test-network-function/cnf-certification-test-partner path: cnf-certification-test-partner - - name: Start the Kind cluster for `local-test-infra` - uses: ./cnf-certification-test-partner/.github/actions/start-k8s-cluster + - name: Bootstrap cluster, docker, and python + uses: nick-fields/retry@v2 with: - working_directory: cnf-certification-test-partner + timeout_minutes: 90 + max_attempts: 3 + command: cd ${GITHUB_WORKSPACE}/cnf-certification-test-partner; make bootstrap-cluster; make make bootstrap-docker-ubuntu-local; make bootstrap-python-ubuntu-local - name: Create `local-test-infra` OpenShift resources - uses: ./cnf-certification-test-partner/.github/actions/create-local-test-infra-resources + uses: nick-fields/retry@v2 with: - working_directory: cnf-certification-test-partner + timeout_minutes: 90 + max_attempts: 3 + command: cd ${GITHUB_WORKSPACE}/cnf-certification-test-partner; make rebuild-cluster + + - name: Create `local-test-infra` OpenShift resources + uses: nick-fields/retry@v2 + with: + timeout_minutes: 90 + max_attempts: 3 + command: cd ${GITHUB_WORKSPACE}/cnf-certification-test-partner; make install # Perform smoke tests. - name: 'Test: Run test suites' @@ -320,15 +331,26 @@ jobs: repository: test-network-function/cnf-certification-test-partner path: cnf-certification-test-partner - - name: Start the Kind cluster for `local-test-infra` - uses: ./cnf-certification-test-partner/.github/actions/start-k8s-cluster + - name: Bootstrap cluster, docker, and python + uses: nick-fields/retry@v2 + with: + timeout_minutes: 90 + max_attempts: 3 + command: cd ${GITHUB_WORKSPACE}/cnf-certification-test-partner; make bootstrap-cluster; make make bootstrap-docker-ubuntu-local; make bootstrap-python-ubuntu-local + + - name: Create `local-test-infra` OpenShift resources + uses: nick-fields/retry@v2 with: - working_directory: cnf-certification-test-partner + timeout_minutes: 90 + max_attempts: 3 + command: cd ${GITHUB_WORKSPACE}/cnf-certification-test-partner; make rebuild-cluster - name: Create `local-test-infra` OpenShift resources - uses: ./cnf-certification-test-partner/.github/actions/create-local-test-infra-resources + uses: nick-fields/retry@v2 with: - working_directory: cnf-certification-test-partner + timeout_minutes: 90 + max_attempts: 3 + command: cd ${GITHUB_WORKSPACE}/cnf-certification-test-partner; make install # needed by depends-on-action - name: Set up Go 1.21 @@ -336,8 +358,6 @@ jobs: with: go-version: 1.21.5 - - # Perform smoke tests using a TNF container. - name: Check out code into the Go module directory uses: actions/checkout@v4 diff --git a/.github/workflows/qe-hosted.yml b/.github/workflows/qe-hosted.yml index f63cef9d90..2e4c35c283 100644 --- a/.github/workflows/qe-hosted.yml +++ b/.github/workflows/qe-hosted.yml @@ -65,17 +65,26 @@ jobs: repository: test-network-function/cnf-certification-test-partner path: cnf-certification-test-partner - - name: Bootstrap the Kind and OC/Kubectl binaries for the `local-test-infra` - run: make bootstrap-cluster - working-directory: cnf-certification-test-partner + - name: Bootstrap cluster, docker, and python + uses: nick-fields/retry@v2 + with: + timeout_minutes: 90 + max_attempts: 3 + command: cd ${GITHUB_WORKSPACE}/cnf-certification-test-partner; make bootstrap-cluster; make make bootstrap-docker-ubuntu-local; make bootstrap-python-ubuntu-local - name: Create `local-test-infra` OpenShift resources - run: make rebuild-cluster - working-directory: cnf-certification-test-partner + uses: nick-fields/retry@v2 + with: + timeout_minutes: 90 + max_attempts: 3 + command: cd ${GITHUB_WORKSPACE}/cnf-certification-test-partner; make rebuild-cluster - name: Install partner resources - run: make install-for-qe - working-directory: cnf-certification-test-partner + uses: nick-fields/retry@v2 + with: + timeout_minutes: 90 + max_attempts: 3 + command: cd ${GITHUB_WORKSPACE}/cnf-certification-test-partner; make install-for-qe - name: Show pods run: oc get pods -A