Skip to content

Commit 0187678

Browse files
authored
[preview] pass context to rollout status, fix regression (#16886)
1 parent 77764b8 commit 0187678

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

.github/workflows/preview-env-check-regressions.yml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
description: "The infrastructure provider to use. Valid options: harvester, gcp"
1717
required: false
1818
default: harvester
19+
1920
jobs:
2021
configuration:
2122
name: Configuration
@@ -46,29 +47,43 @@ jobs:
4647
echo "skip=${{ github.event.workflow_run.conclusion == 'failure' }}"
4748
} >> $GITHUB_OUTPUT
4849
fi
49-
check:
50-
name: Check for regressions
51-
needs: [configuration]
52-
if: ${{ needs.configuration.outputs.skip == 'false' }}
53-
runs-on: [self-hosted]
54-
container:
55-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:kylos101-kubecdl-home.1
50+
51+
infrastructure:
52+
name: Create preview environment infrastructure
53+
needs: [ configuration ]
54+
runs-on: [ self-hosted ]
55+
concurrency:
56+
group: ${{ github.head_ref || github.ref_name }}-infrastructure
5657
steps:
5758
- uses: actions/checkout@v3
5859
- name: Create preview environment infrastructure
60+
id: create
5961
uses: ./.github/actions/preview-create
6062
with:
6163
name: ${{ needs.configuration.outputs.name }}
64+
sa_key: ${{ secrets.GCP_CREDENTIALS }}
6265
infrastructure_provider: ${{ needs.configuration.outputs.infrastructure_provider }}
6366
large_vm: false
64-
sa_key: ${{ secrets.GCP_CREDENTIALS }}
6567
- name: Deploy Gitpod to the preview environment
6668
id: deploy-gitpod
6769
uses: ./.github/actions/deploy-gitpod
6870
with:
6971
name: ${{ needs.configuration.outputs.name }}
7072
sa_key: ${{ secrets.GCP_CREDENTIALS }}
7173
version: ${{ needs.configuration.outputs.version}}
74+
75+
check:
76+
name: Check for regressions
77+
needs: [configuration, infrastructure]
78+
if: ${{ needs.configuration.outputs.skip == 'false' }}
79+
runs-on: [self-hosted]
80+
container:
81+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:kylos101-kubecdl-home.1
82+
volumes:
83+
- /var/tmp:/var/tmp
84+
- /tmp:/tmp
85+
steps:
86+
- uses: actions/checkout@v3
7287
- name: Check
7388
shell: bash
7489
env:
@@ -142,8 +157,15 @@ jobs:
142157
SLACK_WEBHOOK: '${{ steps.secrets.outputs.devx-slack-webhook }}'
143158
SLACK_COLOR: ${{ job.status }}
144159
SLACK_MESSAGE: "`${{ needs.configuration.outputs.version}}` smoke test failed"
160+
161+
delete:
162+
name: Delete preview environment
163+
needs: [ configuration, infrastructure, check ]
164+
if: always()
165+
runs-on: [ self-hosted ]
166+
steps:
167+
- uses: actions/checkout@v3
145168
- name: Delete preview environment
146-
if: always()
147169
uses: ./.github/actions/delete-preview
148170
with:
149171
name: ${{ needs.configuration.outputs.name }}

dev/preview/workflow/preview/deploy-gitpod.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ rm -f "${INSTALLER_RENDER_PATH}"
617617
# Wait for objects to be ready
618618
# =========================
619619
for item in deployment.apps/blobserve deployment.apps/content-service deployment.apps/dashboard deployment.apps/ide-metrics deployment.apps/ide-proxy deployment.apps/ide-service deployment.apps/image-builder-mk3 deployment.apps/minio deployment.apps/node-labeler deployment.apps/payment-endpoint deployment.apps/proxy deployment.apps/public-api-server deployment.apps/redis deployment.apps/server deployment.apps/spicedb deployment.apps/usage deployment.apps/ws-manager deployment.apps/ws-manager-bridge deployment.apps/ws-proxy statefulset.apps/messagebus statefulset.apps/mysql statefulset.apps/openvsx-proxy daemonset.apps/agent-smith daemonset.apps/fluent-bit daemonset.apps/registry-facade daemonset.apps/ws-daemon; do
620-
kubectl rollout status "${item}"
620+
kubectl --kubeconfig "${PREVIEW_K3S_KUBE_PATH}" --context "${PREVIEW_K3S_KUBE_CONTEXT}" rollout status "${item}"
621621
done
622622

623623
# =====================

0 commit comments

Comments
 (0)