8
8
types :
9
9
- opened
10
10
- edited
11
- - synchronize
12
- - reopened
13
11
- closed
14
- paths :
15
- - client/**
16
- - helm-chart/**
17
- - tests/**
18
- - server/**
19
- - .github/workflows/**
20
- - chartpress.yaml
12
+ - reopened
13
+ - synchronize
21
14
22
15
concurrency :
23
- group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
24
17
cancel-in-progress : true
25
18
26
19
jobs :
27
20
check-deploy :
28
21
name : Analyze deploy string
29
22
runs-on : ubuntu-24.04
30
23
outputs :
31
- pr-contains-string : ${{ steps.deploy-comment.outputs.pr-contains-string }}
24
+ deploy : ${{ steps.deploy-comment.outputs.pr-contains-string }}
32
25
renku : ${{ steps.deploy-comment.outputs.renku}}
33
26
renku-core : ${{ steps.deploy-comment.outputs.renku-core}}
34
27
renku-gateway : ${{ steps.deploy-comment.outputs.renku-gateway}}
41
34
test-legacy-enabled : ${{ steps.deploy-comment.outputs.test-legacy-enabled}}
42
35
extra-values : ${{ steps.deploy-comment.outputs.extra-values}}
43
36
steps :
44
- - id : deploy-comment
45
- uses : SwissDataScienceCenter/renku-actions/check-pr-description@v1.18.2
37
+ - name : Check PR description
38
+ id : deploy-comment
39
+ uses : SwissDataScienceCenter/renku-actions/check-pr-description@v1.19.0
46
40
with :
47
41
pr_ref : ${{ github.event.number }}
48
42
@@ -52,23 +46,28 @@ jobs:
52
46
needs : [check-deploy]
53
47
permissions :
54
48
pull-requests : write
55
- if : github.event.action != 'closed' && needs.check-deploy.outputs.pr-contains-string == 'true'
56
- environment :
57
- name : renku-ci-ui-${{ github.event.number }}
58
- url : https://renku-ci-ui-${{ github.event.number }}.dev.renku.ch
49
+ id-token : write
50
+ if : github.event.action != 'closed' && needs.check-deploy.outputs.deploy == 'true'
51
+ # NOTE: using GitHub deploy environments does not work with Azure at the moment
52
+ # environment:
53
+ # name: renku-ci-ui-${{ github.event.number }}
54
+ # url: https://renku-ci-ui-${{ github.event.number }}.dev.renku.ch
59
55
steps :
60
- - uses : actions/checkout@v4
56
+ - name : Checkout renku repository
57
+ uses : actions/checkout@v4
61
58
with :
62
59
repository : SwissDataScienceCenter/renku
63
60
sparse-checkout : |
64
61
minimal-deployment
62
+
65
63
- name : Find deplyoment url
66
64
uses : peter-evans/find-comment@v3
67
65
id : deploymentUrlMessage
68
66
with :
69
67
issue-number : ${{ github.event.pull_request.number }}
70
68
comment-author : " RenkuBot"
71
69
body-includes : " You can access the deployment of this PR at"
70
+
72
71
- name : Create comment deployment url
73
72
if : steps.deploymentUrlMessage.outputs.comment-id == 0
74
73
uses : peter-evans/create-or-update-comment@v4
@@ -77,19 +76,40 @@ jobs:
77
76
issue-number : ${{ github.event.pull_request.number }}
78
77
body : |
79
78
You can access the deployment of this PR at https://renku-ci-ui-${{ github.event.number }}.dev.renku.ch
79
+
80
+ - name : Azure login
81
+ uses : azure/login@v2
82
+ with :
83
+ client-id : ${{ secrets.CI_RENKU_AZURE_CLIENT_ID }}
84
+ tenant-id : ${{ secrets.CI_RENKU_AZURE_TENANT_ID }}
85
+ subscription-id : ${{ secrets.CI_RENKU_AZURE_SUBSCRIPTION_ID }}
86
+
87
+ - name : Set AKS context
88
+ uses : azure/aks-set-context@v4
89
+ with :
90
+ resource-group : " renku-dev"
91
+ cluster-name : " aks-switzerlandnorth-renku-dev"
92
+
93
+ # See: https://github.com/orgs/community/discussions/168949
94
+ # It is easier to have the kube config in {{ github.workspace }}.
95
+ - name : Setup kubeconfig
96
+ run : |
97
+ mv "${KUBECONFIG}" "${{ github.workspace }}/renkubot-kube.config"
98
+ export KUBECONFIG="${{ github.workspace }}/renkubot-kube.config"
99
+ echo "KUBECONFIG=${KUBECONFIG}" >> "$GITHUB_ENV"
100
+
80
101
- name : Build and deploy
81
- uses : SwissDataScienceCenter/renku-actions/deploy-renku@v1.18.2
102
+ uses : SwissDataScienceCenter/renku-actions/deploy-renku@v1.19.0
82
103
env :
83
104
DOCKER_PASSWORD : ${{ secrets.RENKU_DOCKER_PASSWORD }}
84
105
DOCKER_USERNAME : ${{ secrets.RENKU_DOCKER_USERNAME }}
85
106
GITLAB_TOKEN : ${{ secrets.DEV_GITLAB_TOKEN }}
86
- KUBECONFIG : ${{ github.workspace }}/renkubot-kube.config
87
107
RENKU_RELEASE : renku-ci-ui-${{ github.event.number }}
88
108
RENKU_VALUES_FILE : ${{ github.workspace }}/values.yaml
89
109
RENKU_VALUES : minimal-deployment/minimal-deployment-values.yaml
90
- RENKUBOT_KUBECONFIG : ${{ secrets.RENKUBOT_DEV_KUBECONFIG }}
91
- RENKUBOT_RANCHER_BEARER_TOKEN : ${{ secrets.RENKUBOT_RANCHER_BEARER_TOKEN }}
92
110
TEST_ARTIFACTS_PATH : " tests-artifacts-${{ github.sha }}"
111
+ KUBERNETES_CLUSTER_FQDN : " dev.renku.ch"
112
+ RENKU_ANONYMOUS_SESSIONS : " true"
93
113
renku_ui : " @${{ github.head_ref }}"
94
114
renku : " ${{ needs.check-deploy.outputs.renku }}"
95
115
renku_core : " ${{ needs.check-deploy.outputs.renku-core }}"
@@ -105,7 +125,7 @@ jobs:
105
125
name : Legacy Cypress tests
106
126
runs-on : ubuntu-24.04
107
127
needs : [check-deploy, deploy-pr]
108
- if : github.event.action != 'closed' && needs.check-deploy.outputs.pr-contains-string == 'true' && needs.check-deploy.outputs.test-legacy-enabled == 'true'
128
+ if : github.event.action != 'closed' && needs.check-deploy.outputs.deploy == 'true' && needs.check-deploy.outputs.test-legacy-enabled == 'true'
109
129
strategy :
110
130
fail-fast : false
111
131
matrix :
@@ -120,7 +140,7 @@ jobs:
120
140
steps :
121
141
- name : Extract Renku repository reference
122
142
run : echo "RENKU_REFERENCE=`echo '${{ needs.check-deploy.outputs.renku }}' | cut -d'@' -f2`" >> $GITHUB_ENV
123
- - uses : SwissDataScienceCenter/renku-actions/test-renku-cypress@v1.18.2
143
+ - uses : SwissDataScienceCenter/renku-actions/test-renku-cypress@v1.19.0
124
144
with :
125
145
e2e-target : ${{ matrix.tests }}
126
146
renku-reference : ${{ env.RENKU_REFERENCE }}
@@ -131,7 +151,7 @@ jobs:
131
151
name : Cypress tests
132
152
runs-on : ubuntu-24.04
133
153
needs : [check-deploy, deploy-pr]
134
- if : github.event.action != 'closed' && needs.check-deploy.outputs.pr-contains-string == 'true' && needs.check-deploy.outputs.test-enabled == 'true'
154
+ if : github.event.action != 'closed' && needs.check-deploy.outputs.deploy == 'true' && needs.check-deploy.outputs.test-enabled == 'true'
135
155
strategy :
136
156
fail-fast : false
137
157
matrix :
@@ -146,7 +166,7 @@ jobs:
146
166
steps :
147
167
- name : Extract Renku repository reference
148
168
run : echo "RENKU_REFERENCE=`echo '${{ needs.check-deploy.outputs.renku }}' | cut -d'@' -f2`" >> $GITHUB_ENV
149
- - uses : SwissDataScienceCenter/renku-actions/test-renku-cypress@v1.18.2
169
+ - uses : SwissDataScienceCenter/renku-actions/test-renku-cypress@v1.19.0
150
170
with :
151
171
e2e-folder : cypress/e2e/v2/
152
172
e2e-target : ${{ matrix.tests }}
@@ -158,9 +178,10 @@ jobs:
158
178
name : Cleanup
159
179
runs-on : ubuntu-24.04
160
180
needs : check-deploy
161
- if : github.event.action == 'closed' && needs.check-deploy.outputs.pr-contains-string == 'true'
181
+ if : github.event.action == 'closed' && needs.check-deploy.outputs.deploy == 'true'
162
182
permissions :
163
183
pull-requests : write
184
+ id-token : write
164
185
steps :
165
186
- name : Find deplyoment url
166
187
uses : peter-evans/find-comment@v3
@@ -169,6 +190,7 @@ jobs:
169
190
issue-number : ${{ github.event.pull_request.number }}
170
191
comment-author : " RenkuBot"
171
192
body-includes : " Tearing down the temporary RenkuLab deplyoment"
193
+
172
194
- name : Create comment deployment url
173
195
if : steps.deploymentUrlMessage.outputs.comment-id == 0
174
196
uses : peter-evans/create-or-update-comment@v4
@@ -177,11 +199,32 @@ jobs:
177
199
issue-number : ${{ github.event.pull_request.number }}
178
200
body : |
179
201
Tearing down the temporary RenkuLab deplyoment for this PR.
180
- - name : renku teardown
181
- uses : SwissDataScienceCenter/renku-actions/cleanup-renku-ci-deployments@v1.18.2
202
+
203
+ - name : Azure login
204
+ uses : azure/login@v2
205
+ with :
206
+ client-id : ${{ secrets.CI_RENKU_AZURE_CLIENT_ID }}
207
+ tenant-id : ${{ secrets.CI_RENKU_AZURE_TENANT_ID }}
208
+ subscription-id : ${{ secrets.CI_RENKU_AZURE_SUBSCRIPTION_ID }}
209
+
210
+ - name : Set AKS context
211
+ uses : azure/aks-set-context@v4
212
+ with :
213
+ resource-group : " renku-dev"
214
+ cluster-name : " aks-switzerlandnorth-renku-dev"
215
+
216
+ # See: https://github.com/orgs/community/discussions/168949
217
+ # It is easier to have the kube config in {{ github.workspace }}.
218
+ - name : Setup kubeconfig
219
+ run : |
220
+ mv "${KUBECONFIG}" "${{ github.workspace }}/renkubot-kube.config"
221
+ export KUBECONFIG="${{ github.workspace }}/renkubot-kube.config"
222
+ echo "KUBECONFIG=${KUBECONFIG}" >> "$GITHUB_ENV"
223
+
224
+ - name : Renku teardown
225
+ uses : SwissDataScienceCenter/renku-actions/cleanup-renku-ci-deployments@v1.19.0
182
226
env :
183
227
HELM_RELEASE_REGEX : " ^renku-ci-ui-${{ github.event.number }}$"
184
228
GITLAB_TOKEN : ${{ secrets.DEV_GITLAB_TOKEN }}
185
- RENKUBOT_KUBECONFIG : ${{ secrets.RENKUBOT_DEV_KUBECONFIG }}
186
229
MAX_AGE_SECONDS : 0
187
230
DELETE_NAMESPACE : " true"
0 commit comments