Skip to content

Commit c06646c

Browse files
committed
[preview] pass context to rollout status, fix regression
1 parent c0d6fa9 commit c06646c

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed

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

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,39 @@ jobs:
4646
echo "skip=${{ github.event.workflow_run.conclusion == 'failure' }}"
4747
} >> $GITHUB_OUTPUT
4848
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
49+
50+
infrastructure:
51+
name: Create preview environment infrastructure
52+
needs: [ configuration ]
53+
runs-on: [ self-hosted ]
54+
concurrency:
55+
group: ${{ github.head_ref || github.ref_name }}-infrastructure
5656
steps:
5757
- uses: actions/checkout@v3
5858
- name: Create preview environment infrastructure
59+
id: create
5960
uses: ./.github/actions/preview-create
6061
with:
6162
name: ${{ needs.configuration.outputs.name }}
62-
infrastructure_provider: ${{ needs.configuration.outputs.infrastructure_provider }}
63-
large_vm: false
6463
sa_key: ${{ secrets.GCP_CREDENTIALS }}
64+
infrastructure_provider: ${{ needs.configuration.outputs.infrastructure_provider }}
6565
- name: Deploy Gitpod to the preview environment
6666
id: deploy-gitpod
6767
uses: ./.github/actions/deploy-gitpod
6868
with:
6969
name: ${{ needs.configuration.outputs.name }}
7070
sa_key: ${{ secrets.GCP_CREDENTIALS }}
7171
version: ${{ needs.configuration.outputs.version}}
72+
73+
check:
74+
name: Check for regressions
75+
needs: [configuration, infrastructue]
76+
if: ${{ needs.configuration.outputs.skip == 'false' }}
77+
runs-on: [self-hosted]
78+
container:
79+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:kylos101-kubecdl-home.1
80+
steps:
81+
- uses: actions/checkout@v3
7282
- name: Check
7383
shell: bash
7484
env:
@@ -140,8 +150,15 @@ jobs:
140150
SLACK_WEBHOOK: '${{ steps.secrets.outputs.devx-slack-webhook }}'
141151
SLACK_COLOR: ${{ job.status }}
142152
SLACK_MESSAGE: "`${{ needs.configuration.outputs.version}}` smoke test failed"
153+
154+
delete:
155+
name: Delete preview environment
156+
needs: [ configuration, infrastructure, check ]
157+
if: always()
158+
runs-on: [ self-hosted ]
159+
steps:
160+
- uses: actions/checkout@v3
143161
- name: Delete preview environment
144-
if: always()
145162
uses: ./.github/actions/delete-preview
146163
with:
147164
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)