Skip to content

Commit

Permalink
chore(ci): Wait for operator pod to start
Browse files Browse the repository at this point in the history
Stabilize the CI workflow and avoid errors due to tests running before operator has completely started
  • Loading branch information
christophd committed Aug 28, 2023
1 parent ec683f3 commit 4961c3d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -87,13 +88,19 @@ 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/[email protected]
with:
version: v${{ env.YAKS_VERSION }}
- 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
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -81,13 +82,19 @@ 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/[email protected]
with:
version: v${{ env.YAKS_VERSION }}
- 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
Expand All @@ -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
Expand Down Expand Up @@ -160,13 +168,19 @@ 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/[email protected]
with:
version: v${{ env.YAKS_VERSION }}
- 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
Expand Down

0 comments on commit 4961c3d

Please sign in to comment.