@@ -46,29 +46,39 @@ jobs:
46
46
echo "skip=${{ github.event.workflow_run.conclusion == 'failure' }}"
47
47
} >> $GITHUB_OUTPUT
48
48
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
56
56
steps :
57
57
- uses : actions/checkout@v3
58
58
- name : Create preview environment infrastructure
59
+ id : create
59
60
uses : ./.github/actions/preview-create
60
61
with :
61
62
name : ${{ needs.configuration.outputs.name }}
62
- infrastructure_provider : ${{ needs.configuration.outputs.infrastructure_provider }}
63
- large_vm : false
64
63
sa_key : ${{ secrets.GCP_CREDENTIALS }}
64
+ infrastructure_provider : ${{ needs.configuration.outputs.infrastructure_provider }}
65
65
- name : Deploy Gitpod to the preview environment
66
66
id : deploy-gitpod
67
67
uses : ./.github/actions/deploy-gitpod
68
68
with :
69
69
name : ${{ needs.configuration.outputs.name }}
70
70
sa_key : ${{ secrets.GCP_CREDENTIALS }}
71
71
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
72
82
- name : Check
73
83
shell : bash
74
84
env :
@@ -140,8 +150,15 @@ jobs:
140
150
SLACK_WEBHOOK : ' ${{ steps.secrets.outputs.devx-slack-webhook }}'
141
151
SLACK_COLOR : ${{ job.status }}
142
152
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
143
161
- name : Delete preview environment
144
- if : always()
145
162
uses : ./.github/actions/delete-preview
146
163
with :
147
164
name : ${{ needs.configuration.outputs.name }}
0 commit comments