diff options
author | Amit Rathi <amit.juschill@gmail.com> | 2019-06-05 19:50:29 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-06-05 19:50:29 +0000 |
commit | 13a8722464565b272bc00acd608761a3a83dcce0 (patch) | |
tree | 9b67c5e5ffe01e6288518537629090c91a823a6c /vendor | |
parent | 93d4353be91bc81a11e17cdf7e5dc3d347221542 (diff) | |
download | gitlab-ce-13a8722464565b272bc00acd608761a3a83dcce0.tar.gz |
Setup Git client for Jupyter
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/jupyter/values.yaml | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/vendor/jupyter/values.yaml b/vendor/jupyter/values.yaml index a5e13fdc104..0fbf36b39cc 100644 --- a/vendor/jupyter/values.yaml +++ b/vendor/jupyter/values.yaml @@ -4,9 +4,9 @@ rbac: hub: extraEnv: JUPYTER_ENABLE_LAB: 1 - SINGLEUSER_IMAGE: 'registry.gitlab.com/gitlab-org/jupyterhub-user-image:latest' extraConfig: | c.KubeSpawner.cmd = ['jupyter-labhub'] + c.GitLabOAuthenticator.scope = ['api read_repository write_repository'] async def add_auth_env(spawner): ''' @@ -23,6 +23,8 @@ hub: spawner.environment['GITLAB_ACCESS_TOKEN'] = auth_state['access_token'] spawner.environment['GITLAB_USER_LOGIN'] = auth_state['gitlab_user']['username'] spawner.environment['GITLAB_USER_ID'] = str(auth_state['gitlab_user']['id']) + spawner.environment['GITLAB_USER_EMAIL'] = auth_state['gitlab_user']['email'] + spawner.environment['GITLAB_USER_NAME'] = auth_state['gitlab_user']['name'] c.KubeSpawner.pre_spawn_hook = add_auth_env @@ -33,10 +35,22 @@ auth: singleuser: defaultUrl: "/lab" + image: + name: registry.gitlab.com/gitlab-org/jupyterhub-user-image + tag: latest lifecycleHooks: postStart: exec: - command: ["sh", "-c", "git clone https://gitlab.com/gitlab-org/nurtch-demo.git DevOps-Runbook-Demo || true"] + command: + - "sh" + - "-c" + - > + git clone https://gitlab.com/gitlab-org/nurtch-demo.git DevOps-Runbook-Demo || true; + echo "https://${GITLAB_USER_LOGIN}:${GITLAB_ACCESS_TOKEN}@${GITLAB_HOST}" > ~/.git-credentials; + git config --global credential.helper store; + git config --global user.email "${GITLAB_USER_EMAIL}"; + git config --global user.name "${GITLAB_USER_NAME}"; + jupyter serverextension enable --py jupyterlab_git ingress: enabled: true |