Skip to content

Commit f39efcd

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

File tree

3 files changed

+67
-26
lines changed

3 files changed

+67
-26
lines changed

.github/workflows/ide-integration-tests.yml

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,29 +58,43 @@ jobs:
5858
SLACK_WEBHOOK: ${{ secrets.IDE_SLACK_WEBHOOK }}
5959
SLACK_COLOR: ${{ job.status }}
6060
SLACK_MESSAGE: main branch build failed
61-
check:
62-
name: Check for regressions
63-
needs: [configuration]
64-
runs-on: [self-hosted]
65-
container:
66-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:kylos101-kubecdl-home.1
61+
62+
infrastructure:
63+
name: Create preview environment infrastructure
64+
needs: [ configuration ]
65+
runs-on: [ self-hosted ]
66+
concurrency:
67+
group: ${{ github.head_ref || github.ref_name }}-infrastructure
6768
steps:
6869
- uses: actions/checkout@v3
6970
- name: Create preview environment infrastructure
71+
id: create
7072
uses: ./.github/actions/preview-create
7173
with:
7274
name: ${{ needs.configuration.outputs.name }}
73-
infrastructure_provider: harvester
74-
large_vm: true
7575
sa_key: ${{ secrets.GCP_CREDENTIALS }}
76+
infrastructure_provider: ${{ needs.configuration.outputs.infrastructure_provider }}
7677
- name: Deploy Gitpod to the preview environment
77-
if: github.event.inputs.skip_deploy != 'true'
7878
id: deploy-gitpod
7979
uses: ./.github/actions/deploy-gitpod
8080
with:
8181
name: ${{ needs.configuration.outputs.name }}
8282
sa_key: ${{ secrets.GCP_CREDENTIALS }}
83+
infrastructure_provider: harvester
84+
large_vm: true
8385
version: ${{ needs.configuration.outputs.version}}
86+
87+
check:
88+
name: Check for regressions
89+
needs: [configuration, infrastructure]
90+
runs-on: [self-hosted]
91+
container:
92+
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:kylos101-kubecdl-home.1
93+
volumes:
94+
- /var/tmp:/var/tmp
95+
- /tmp:/tmp
96+
steps:
97+
- uses: actions/checkout@v3
8498
- name: Integration Test
8599
shell: bash
86100
env:
@@ -153,9 +167,16 @@ jobs:
153167
SLACK_WEBHOOK: ${{ secrets.IDE_SLACK_WEBHOOK }}
154168
SLACK_COLOR: ${{ job.status }}
155169
SLACK_MESSAGE: ${{ steps.test_summary.outputs.passed }}/${{ steps.test_summary.outputs.total }} tests passed
156-
- name: Delete preview environment
157-
if: github.event.inputs.skip_delete != 'true' && (success() || failure())
158-
uses: ./.github/actions/delete-preview
159-
with:
160-
name: ${{ needs.configuration.outputs.name }}
161-
sa_key: ${{ secrets.GCP_CREDENTIALS }}
170+
171+
delete:
172+
name: Delete preview environment
173+
needs: [ configuration, infrastructure, check ]
174+
if: github.event.inputs.skip_delete != 'true' && always()
175+
runs-on: [ self-hosted ]
176+
steps:
177+
- uses: actions/checkout@v3
178+
- name: Delete preview environment
179+
uses: ./.github/actions/delete-preview
180+
with:
181+
name: ${{ needs.configuration.outputs.name }}
182+
sa_key: ${{ secrets.GCP_CREDENTIALS }}

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

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,42 @@ 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+
volumes:
81+
- /var/tmp:/var/tmp
82+
- /tmp:/tmp
83+
steps:
84+
- uses: actions/checkout@v3
7285
- name: Check
7386
shell: bash
7487
env:
@@ -140,8 +153,15 @@ jobs:
140153
SLACK_WEBHOOK: '${{ steps.secrets.outputs.devx-slack-webhook }}'
141154
SLACK_COLOR: ${{ job.status }}
142155
SLACK_MESSAGE: "`${{ needs.configuration.outputs.version}}` smoke test failed"
156+
157+
delete:
158+
name: Delete preview environment
159+
needs: [ configuration, infrastructure, check ]
160+
if: always()
161+
runs-on: [ self-hosted ]
162+
steps:
163+
- uses: actions/checkout@v3
143164
- name: Delete preview environment
144-
if: always()
145165
uses: ./.github/actions/delete-preview
146166
with:
147167
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)