File tree Expand file tree Collapse file tree
src/harness_jupyter/harness_jupyter Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313#CLOUDHARNESS: EDIT START
1414import logging
15- from kubernetes import client
16- from jupyterhub .utils import url_path_join
1715
1816try :
1917 from harness_jupyter .jupyterhub import harness_hub
@@ -492,6 +490,7 @@ def camelCaseify(s):
492490 cfg .pop ("keys" , None )
493491 c [app ].update (cfg )
494492
493+
495494# load /usr/local/etc/jupyterhub/jupyterhub_config.d config files
496495config_dir = "/usr/local/etc/jupyterhub/jupyterhub_config.d"
497496if os .path .isdir (config_dir ):
@@ -560,4 +559,5 @@ def camelCaseify(s):
560559c .registry = get_config ('registry' )
561560c .domain = get_config ('root.domain' )
562561c .namespace = get_config ('root.namespace' )
563- # CLOUDHARNESS: EDIT END
562+ # CLOUDHARNESS: EDIT END
563+
Original file line number Diff line number Diff line change 1+ harness :
2+ accounts :
3+ users :
4+ - username : samplehub@testuser.com
5+ realmRoles :
6+ - offline_access
7+
Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ harness: # EDIT: CLOUDHARNESS
2525 quota-ws-maxmem : 0.5
2626 # sets the storage dedicated to the user data in Gb units (float)
2727 quota-storage-max : 1.25
28+ test :
29+ e2e :
30+ enabled : true
31+ smoketest : true
32+ ignoreRequestErrors : false
33+ ignoreConsoleErrors : false
2834
2935# fullnameOverride and nameOverride distinguishes blank strings, null values,
3036# and non-blank strings. For more details, see the configuration reference.
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ def change_pod_manifest(self: KubeSpawner):
139139
140140 if 'subdomain' in harness and harness ['subdomain' ] == subdomain :
141141 ws_image = getattr (self , "ws_image" , None )
142- logging .info ("Subdomain is" , subdomain )
142+ logging .info ("Subdomain is %s " , subdomain )
143143 if ws_image :
144144 # try getting the image + tag from values.yaml
145145 ch_conf = conf .get_configuration ()
Original file line number Diff line number Diff line change 11harness :
2+ dependencies :
3+ soft :
4+ - workflows
5+ - events
6+ - accounts
7+ - common
8+ - nfsserver
9+ - jupyterhub
210 accounts :
311 roles :
412 - role1
Original file line number Diff line number Diff line change @@ -165,6 +165,28 @@ steps:
165165 == true
166166 forceNoCache : includes('${{ACCOUNTS_TAG_FORCE_BUILD}}', '{{ACCOUNTS_TAG_FORCE_BUILD}}')
167167 == false
168+ jupyterhub :
169+ type : build
170+ stage : build
171+ dockerfile : Dockerfile
172+ registry : ' ${{CODEFRESH_REGISTRY}}'
173+ buildkit : true
174+ build_arguments :
175+ - DOMAIN=${{DOMAIN}}
176+ - NOCACHE=${{CF_BUILD_ID}}
177+ - REGISTRY=${{REGISTRY}}/cloudharness/
178+ - CLOUDHARNESS_BASE=${{REGISTRY}}/cloudharness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
179+ image_name : cloudharness/jupyterhub
180+ title : Jupyterhub
181+ working_directory : ./applications/jupyterhub
182+ tag : ' ${{JUPYTERHUB_TAG}}'
183+ when :
184+ condition :
185+ any :
186+ buildDoesNotExist : includes('${{JUPYTERHUB_TAG_EXISTS}}', '{{JUPYTERHUB_TAG_EXISTS}}')
187+ == true
188+ forceNoCache : includes('${{JUPYTERHUB_TAG_FORCE_BUILD}}', '{{JUPYTERHUB_TAG_FORCE_BUILD}}')
189+ == false
168190 samples :
169191 type : build
170192 stage : build
@@ -510,6 +532,14 @@ steps:
510532 commands :
511533 - yarn test
512534 scale :
535+ jupyterhub_e2e_test :
536+ title : jupyterhub e2e test
537+ volumes :
538+ - ' ${{CF_REPO_NAME}}/applications/jupyterhub/test/e2e:/home/test/__tests__/jupyterhub'
539+ environment :
540+ - APP_URL=https://hub.${{DOMAIN}}
541+ - USERNAME=samplehub@testuser.com
542+ - PASSWORD=test
513543 samples_e2e_test :
514544 title : samples e2e test
515545 volumes :
You can’t perform that action at this time.
0 commit comments