@@ -58,29 +58,43 @@ jobs:
58
58
SLACK_WEBHOOK : ${{ secrets.IDE_SLACK_WEBHOOK }}
59
59
SLACK_COLOR : ${{ job.status }}
60
60
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
67
68
steps :
68
69
- uses : actions/checkout@v3
69
70
- name : Create preview environment infrastructure
71
+ id : create
70
72
uses : ./.github/actions/preview-create
71
73
with :
72
74
name : ${{ needs.configuration.outputs.name }}
75
+ sa_key : ${{ secrets.GCP_CREDENTIALS }}
73
76
infrastructure_provider : harvester
74
77
large_vm : true
75
- sa_key : ${{ secrets.GCP_CREDENTIALS }}
76
78
- name : Deploy Gitpod to the preview environment
77
- if : github.event.inputs.skip_deploy != 'true'
78
79
id : deploy-gitpod
80
+ if : github.event.inputs.skip_deploy != 'true'
79
81
uses : ./.github/actions/deploy-gitpod
80
82
with :
81
83
name : ${{ needs.configuration.outputs.name }}
82
84
sa_key : ${{ secrets.GCP_CREDENTIALS }}
83
85
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
84
98
- name : Integration Test
85
99
shell : bash
86
100
env :
@@ -153,9 +167,16 @@ jobs:
153
167
SLACK_WEBHOOK : ${{ secrets.IDE_SLACK_WEBHOOK }}
154
168
SLACK_COLOR : ${{ job.status }}
155
169
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 }}
0 commit comments