@@ -13,16 +13,28 @@ steps:
1313 repo : ' ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
1414 revision : ' ${{CF_BRANCH}}'
1515 git : github
16-
16+ post_main_clone :
17+ title : Post main clone
18+ type : parallel
19+ stage : prepare
20+ steps :
21+ clone_cloud_harness :
22+ title : Cloning cloud-harness repository...
23+ type : git-clone
24+ stage : prepare
25+ repo : https://github.com/MetaCell/cloud-harness.git
26+ revision : ' ${{CLOUDHARNESS_BRANCH}}'
27+ working_directory : .
28+ git : github
1729 prepare_deployment :
1830 title : Prepare helm chart
1931 image : python:3.12
2032 stage : prepare
2133 working_directory : .
2234 commands :
23- - bash install.sh
24- - harness-deployment . -n test-${{NAMESPACE_BASENAME}} -d ${{DOMAIN}} -r ${{REGISTRY}}
25- -rs ${{REGISTRY_SECRET}} -e test --write-env -N -i samples
35+ - bash cloud-harness/ install.sh
36+ - ' harness-deployment . -n test-${{NAMESPACE_BASENAME}} -d ${{DOMAIN}} -r ${{REGISTRY}}
37+ -rs ${{REGISTRY_SECRET}} -e test --write-env -N '
2638 - cat deployment/.env >> ${{CF_VOLUME_PATH}}/env_vars_to_export
2739 - cat ${{CF_VOLUME_PATH}}/env_vars_to_export
2840 prepare_deployment_view :
@@ -112,6 +124,49 @@ steps:
112124 type : parallel
113125 stage : build
114126 steps :
127+ nfsserver :
128+ type : build
129+ stage : build
130+ dockerfile : Dockerfile
131+ registry : ' ${{CODEFRESH_REGISTRY}}'
132+ buildkit : true
133+ build_arguments :
134+ - DOMAIN=${{DOMAIN}}
135+ - NOCACHE=${{CF_BUILD_ID}}
136+ - REGISTRY=${{REGISTRY}}/cloudharness/
137+ image_name : cloudharness/nfsserver
138+ title : Nfsserver
139+ working_directory : ./applications/nfsserver
140+ tag : ' ${{NFSSERVER_TAG}}'
141+ when :
142+ condition :
143+ any :
144+ buildDoesNotExist : includes('${{NFSSERVER_TAG_EXISTS}}', '{{NFSSERVER_TAG_EXISTS}}')
145+ == true
146+ forceNoCache : includes('${{NFSSERVER_TAG_FORCE_BUILD}}', '{{NFSSERVER_TAG_FORCE_BUILD}}')
147+ == false
148+ notifications :
149+ type : build
150+ stage : build
151+ dockerfile : Dockerfile
152+ registry : ' ${{CODEFRESH_REGISTRY}}'
153+ buildkit : true
154+ build_arguments :
155+ - DOMAIN=${{DOMAIN}}
156+ - NOCACHE=${{CF_BUILD_ID}}
157+ - REGISTRY=${{REGISTRY}}/cloudharness/
158+ - CLOUDHARNESS_BASE=${{REGISTRY}}/cloudharness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
159+ image_name : cloudharness/notifications
160+ title : Notifications
161+ working_directory : ./applications/notifications/server
162+ tag : ' ${{NOTIFICATIONS_TAG}}'
163+ when :
164+ condition :
165+ any :
166+ buildDoesNotExist : includes('${{NOTIFICATIONS_TAG_EXISTS}}', '{{NOTIFICATIONS_TAG_EXISTS}}')
167+ == true
168+ forceNoCache : includes('${{NOTIFICATIONS_TAG_FORCE_BUILD}}', '{{NOTIFICATIONS_TAG_FORCE_BUILD}}')
169+ == false
115170 accounts :
116171 type : build
117172 stage : build
@@ -133,6 +188,49 @@ steps:
133188 == true
134189 forceNoCache : includes('${{ACCOUNTS_TAG_FORCE_BUILD}}', '{{ACCOUNTS_TAG_FORCE_BUILD}}')
135190 == false
191+ volumemanager :
192+ type : build
193+ stage : build
194+ dockerfile : Dockerfile
195+ registry : ' ${{CODEFRESH_REGISTRY}}'
196+ buildkit : true
197+ build_arguments :
198+ - DOMAIN=${{DOMAIN}}
199+ - NOCACHE=${{CF_BUILD_ID}}
200+ - REGISTRY=${{REGISTRY}}/cloudharness/
201+ - CLOUDHARNESS_FLASK=${{REGISTRY}}/cloudharness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}}
202+ image_name : cloudharness/volumemanager
203+ title : Volumemanager
204+ working_directory : ./applications/volumemanager/server
205+ tag : ' ${{VOLUMEMANAGER_TAG}}'
206+ when :
207+ condition :
208+ any :
209+ buildDoesNotExist : includes('${{VOLUMEMANAGER_TAG_EXISTS}}', '{{VOLUMEMANAGER_TAG_EXISTS}}')
210+ == true
211+ forceNoCache : includes('${{VOLUMEMANAGER_TAG_FORCE_BUILD}}', '{{VOLUMEMANAGER_TAG_FORCE_BUILD}}')
212+ == false
213+ sentry :
214+ type : build
215+ stage : build
216+ dockerfile : Dockerfile
217+ registry : ' ${{CODEFRESH_REGISTRY}}'
218+ buildkit : true
219+ build_arguments :
220+ - DOMAIN=${{DOMAIN}}
221+ - NOCACHE=${{CF_BUILD_ID}}
222+ - REGISTRY=${{REGISTRY}}/cloudharness/
223+ image_name : cloudharness/sentry
224+ title : Sentry
225+ working_directory : ./applications/sentry
226+ tag : ' ${{SENTRY_TAG}}'
227+ when :
228+ condition :
229+ any :
230+ buildDoesNotExist : includes('${{SENTRY_TAG_EXISTS}}', '{{SENTRY_TAG_EXISTS}}')
231+ == true
232+ forceNoCache : includes('${{SENTRY_TAG_FORCE_BUILD}}', '{{SENTRY_TAG_FORCE_BUILD}}')
233+ == false
136234 jupyterhub :
137235 type : build
138236 stage : build
@@ -378,6 +476,11 @@ steps:
378476 custom_value_files :
379477 - ./deployment/helm/values.yaml
380478 custom_values :
479+ - apps_notifications_harness_secrets_email-user=${{EMAIL-USER}}
480+ - apps_notifications_harness_secrets_email-password=${{EMAIL-PASSWORD}}
481+ - apps_sentry_harness_secrets_email-server=${{EMAIL-SERVER}}
482+ - apps_sentry_harness_secrets_email-user=${{EMAIL-USER}}
483+ - apps_sentry_harness_secrets_email-password=${{EMAIL-PASSWORD}}
381484 - apps_samples_harness_secrets_asecret=${{ASECRET}}
382485 build_test_images :
383486 title : Build test images
@@ -434,8 +537,13 @@ steps:
434537 commands :
435538 - kubectl config use-context ${{CLUSTER_NAME}}
436539 - kubectl config set-context --current --namespace=test-${{NAMESPACE_BASENAME}}
540+ - kubectl rollout status deployment/notifications
437541 - kubectl rollout status deployment/accounts
542+ - kubectl rollout status deployment/volumemanager
543+ - kubectl rollout status deployment/sentry
544+ - kubectl rollout status deployment/argo-server-gk
438545 - kubectl rollout status deployment/samples
546+ - kubectl rollout status deployment/samples-gk
439547 - kubectl rollout status deployment/common
440548 - kubectl rollout status deployment/workflows
441549 - sleep 60
@@ -448,6 +556,18 @@ steps:
448556 commands :
449557 - echo $APP_NAME
450558 scale :
559+ volumemanager_api_test :
560+ title : volumemanager api test
561+ volumes :
562+ - ' ${{CF_REPO_NAME}}/applications/volumemanager:/home/test'
563+ - ' ${{CF_REPO_NAME}}/deployment/helm/values.yaml:/opt/cloudharness/resources/allvalues.yaml'
564+ environment :
565+ - APP_URL=https://volumemanager.${{DOMAIN}}/api
566+ - USERNAME=volumes@testuser.com
567+ - PASSWORD=test
568+ commands :
569+ - st --pre-run cloudharness_test.apitest_init run api/openapi.yaml --base-url
570+ https://volumemanager.${{DOMAIN}}/api -c all
451571 samples_api_test :
452572 title : samples api test
453573 volumes :
@@ -522,7 +642,7 @@ steps:
522642 approval :
523643 type : pending-approval
524644 stage : qa
525- title : Approve anyway
645+ title : Approve anyway and delete deployment
526646 description : The pipeline will fail after ${{WAIT_ON_FAIL}} minutes
527647 timeout :
528648 timeUnit : minutes
@@ -531,4 +651,4 @@ steps:
531651 when :
532652 condition :
533653 all :
534- error : ' "${{FAILED}}" == "failed"'
654+ error : ' "${{FAILED}}" == "failed"'
0 commit comments