diff --git a/.github/workflows/kubernetes.yml b/.github/workflows/kubernetes.yml index d556074..9ce4fc9 100644 --- a/.github/workflows/kubernetes.yml +++ b/.github/workflows/kubernetes.yml @@ -39,6 +39,7 @@ jobs: YAKS_VERSION: 0.15.1 YAKS_IMAGE_NAME: "docker.io/citrusframework/yaks" YAKS_RUN_OPTIONS: "--timeout=15m" + KUBECTL_WAIT_TIMEOUT: "180s" steps: - name: Checkout code uses: actions/checkout@v3 @@ -87,6 +88,9 @@ jobs: export KAMEL_INSTALL_REGISTRY_INSECURE=true kamel install + + # Wait for operator to start + kubectl wait pod -l app=camel-k --for condition=Ready --timeout=${{ env.KUBECTL_WAIT_TIMEOUT }} - name: YAKS tools uses: citrusframework/yaks-install-action@v1.1 with: @@ -94,6 +98,9 @@ jobs: - name: Install YAKS run: | yaks install --operator-image $YAKS_IMAGE_NAME:$YAKS_VERSION + + # Wait for operator to start + kubectl wait pod -l app=yaks --for condition=Ready --timeout=${{ env.KUBECTL_WAIT_TIMEOUT }} - name: YAKS Tests run: | # Then run integration tests diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7c29dd7..46de72e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -33,6 +33,7 @@ jobs: YAKS_VERSION: 0.15.1 YAKS_IMAGE_NAME: "docker.io/citrusframework/yaks" YAKS_RUN_OPTIONS: "--timeout=15m" + KUBECTL_WAIT_TIMEOUT: "180s" steps: - name: Checkout code uses: actions/checkout@v3 @@ -81,6 +82,9 @@ jobs: export KAMEL_INSTALL_REGISTRY_INSECURE=true kamel install --maven-repository=https://repository.apache.org/content/repositories/snapshots@id=apache-snapshots@snapshots + + # Wait for operator to start + kubectl wait pod -l app=camel-k --for condition=Ready --timeout=${{ env.KUBECTL_WAIT_TIMEOUT }} - name: YAKS tools uses: citrusframework/yaks-install-action@v1.1 with: @@ -88,6 +92,9 @@ jobs: - name: Install YAKS run: | yaks install --operator-image $YAKS_IMAGE_NAME:$YAKS_VERSION + + # Wait for operator to start + kubectl wait pod -l app=yaks --for condition=Ready --timeout=${{ env.KUBECTL_WAIT_TIMEOUT }} - name: YAKS Tests run: | # Then run integration tests @@ -112,6 +119,7 @@ jobs: YAKS_VERSION: 0.15.1 YAKS_IMAGE_NAME: "docker.io/citrusframework/yaks" YAKS_RUN_OPTIONS: "--timeout=15m" + KUBECTL_WAIT_TIMEOUT: "180s" steps: - name: Checkout code uses: actions/checkout@v3 @@ -160,6 +168,9 @@ jobs: export KAMEL_INSTALL_REGISTRY_INSECURE=true kamel install + + # Wait for operator to start + kubectl wait pod -l app=camel-k --for condition=Ready --timeout=${{ env.KUBECTL_WAIT_TIMEOUT }} - name: YAKS tools uses: citrusframework/yaks-install-action@v1.1 with: @@ -167,6 +178,9 @@ jobs: - name: Install YAKS run: | yaks install --operator-image $YAKS_IMAGE_NAME:$YAKS_VERSION + + # Wait for operator to start + kubectl wait pod -l app=yaks --for condition=Ready --timeout=${{ env.KUBECTL_WAIT_TIMEOUT }} - name: YAKS Tests run: | # Then run integration tests