From bdf277be9c8cc298a336bbf612e91bd30fe73380 Mon Sep 17 00:00:00 2001 From: Joss Whittle Date: Tue, 31 Oct 2023 15:44:20 +0000 Subject: [PATCH 1/4] fix: Update ci not releasing jupyterhub container --- .github/workflows/on-release.yaml | 44 +++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/.github/workflows/on-release.yaml b/.github/workflows/on-release.yaml index afa6031..1909a7d 100644 --- a/.github/workflows/on-release.yaml +++ b/.github/workflows/on-release.yaml @@ -24,8 +24,14 @@ jobs: filters: | jupyter-container: - './.github/workflows/on-release.yaml' - - 'containers/**' - - 'plugins/**' + - 'containers/jupyterlab/**' + - 'containers/custom-packages/**' + - 'containers/files/**' + jupyterhub-container: + - './.github/workflows/on-release.yaml' + - 'containers/jupyterhub/**' + - 'containers/custom-packages/**' + - 'containers/files/**' chart: - './.github/workflows/on-release.yaml' - 'charts/**' @@ -33,10 +39,6 @@ jobs: secrets: slack-token: ${{ secrets.SLACK_TOKEN }} - ###################################################################################################################### - # Container Tasks - ###################################################################################################################### - jupyter-container: # Build the DARE Jupyter container and push it as :rc-1.0.0 needs: changes @@ -47,7 +49,7 @@ jobs: container-registry: ${{ vars.HARBOR_REGISTRY }} container-registry-user: ${{ vars.HARBOR_USER }} container-registry-project: ${{ vars.HARBOR_PROJECT }} - container-registry-repo: ${{ vars.HARBOR_REPO }} + container-registry-repo: jupyter release-tag-format: 'DARE-Jupyter-Container-${version}' slack-channel: ${{ vars.SLACK_CHANNEL }} build-command: | @@ -61,9 +63,29 @@ jobs: container-registry-token: ${{ secrets.HARBOR_TOKEN }} slack-token: ${{ secrets.SLACK_TOKEN }} - ###################################################################################################################### - # Chart Tasks - ###################################################################################################################### + jupyterhub-container: + # Build the DARE Jupyter container and push it as :rc-1.0.0 + needs: changes + if: fromJSON(needs.changes.outputs.changes).jupyterhub-container == 'true' + uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-container.yaml@v4.3.0 + with: + job-name: jupyterhub-container + container-registry: ${{ vars.HARBOR_REGISTRY }} + container-registry-user: ${{ vars.HARBOR_USER }} + container-registry-project: ${{ vars.HARBOR_PROJECT }} + container-registry-repo: jupyterhub + release-tag-format: 'DARE-Jupyterhub-Container-${version}' + slack-channel: ${{ vars.SLACK_CHANNEL }} + build-command: | + sudo apt update && + sudo apt install python3.8-venv && + python -m pip install --user --upgrade build && + python -m build --outdir ./dist ./containers/custom-packages/jupyter-cloudbeaver-proxy && + python -m build --outdir ./dist ./containers/custom-packages/jupyter-rsession-proxy && + docker build -t $IMAGE -f containers/jupyterhub/Dockerfile . + secrets: + container-registry-token: ${{ secrets.HARBOR_TOKEN }} + slack-token: ${{ secrets.SLACK_TOKEN }} chart: # Build the chart and push it as x.y.z-rc @@ -78,7 +100,7 @@ jobs: chart-registry-repo: ${{ vars.HARBOR_REPO }} release-tag-format: 'DARE-Jupyter-Helm-${version}' slack-channel: ${{ vars.SLACK_CHANNEL }} - chart: charts/** + chart: charts/jupyter test-command: | helm template $CHART --values charts/jupyter/values.yaml secrets: From 0715c82efd09b46599250fe12a34a61704e56bd7 Mon Sep 17 00:00:00 2001 From: Joss Whittle Date: Tue, 31 Oct 2023 15:46:56 +0000 Subject: [PATCH 2/4] fix: Update ci not building container properly --- .github/workflows/on-pr-update.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/on-pr-update.yaml b/.github/workflows/on-pr-update.yaml index 2cb0fec..3aa85ac 100644 --- a/.github/workflows/on-pr-update.yaml +++ b/.github/workflows/on-pr-update.yaml @@ -23,9 +23,16 @@ jobs: with: slack-channel: ${{ vars.SLACK_CHANNEL }} filters: | - container: + jupyter-container: - './.github/workflows/on-pr-update.yaml' - - 'containers/**' + - 'containers/jupyterlab/**' + - 'containers/custom-packages/**' + - 'containers/files/**' + jupyterhub-container: + - './.github/workflows/on-pr-update.yaml' + - 'containers/jupyterhub/**' + - 'containers/custom-packages/**' + - 'containers/files/**' chart: - './.github/workflows/on-pr-update.yaml' - 'charts/**' @@ -36,7 +43,7 @@ jobs: jupyterhub-container: # Build the container and push it as :pr-42 and :pr-42-fe45b3h needs: changes - if: fromJSON(needs.changes.outputs.changes).container == 'true' + if: fromJSON(needs.changes.outputs.changes).jupyterhub-container == 'true' uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v4.3.0 with: job-name: jupyterhub-container @@ -59,14 +66,14 @@ jobs: jupyterlab-standard-container: # Build the container and push it as :pr-42 and :pr-42-fe45b3h needs: changes - if: fromJSON(needs.changes.outputs.changes).container == 'true' + if: fromJSON(needs.changes.outputs.changes).jupyter-container == 'true' uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-container.yaml@v4.3.0 with: job-name: jupyterlab-standard-container container-registry: ${{ vars.HARBOR_REGISTRY }} container-registry-user: ${{ vars.HARBOR_USER }} container-registry-project: ${{ vars.HARBOR_PROJECT }} - container-registry-repo: ${{ vars.HARBOR_REPO }} + container-registry-repo: jupyter slack-channel: ${{ vars.SLACK_CHANNEL }} build-command: | sudo apt update && @@ -86,7 +93,7 @@ jobs: uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-chart.yaml@v4.3.0 with: job-name: chart - chart: charts/** + chart: charts/jupyter chart-registry: ${{ vars.HARBOR_REGISTRY }} chart-registry-user: ${{ vars.HARBOR_USER }} chart-registry-project: ${{ vars.HARBOR_PROJECT }} From 7ce97cfc41a0414d0b23e13eec8b4e1d06e3ad06 Mon Sep 17 00:00:00 2001 From: joss Date: Tue, 31 Oct 2023 16:08:44 +0000 Subject: [PATCH 3/4] feat: remove stub chart from repo as we are using our central jupyter chart --- .github/workflows/on-pr-update.yaml | 3 --- .github/workflows/on-release.yaml | 23 ----------------------- charts/jupyter/.helmignore | 23 ----------------------- charts/jupyter/Chart.yaml | 6 ------ charts/jupyter/values.yaml | 10 ---------- 5 files changed, 65 deletions(-) delete mode 100644 charts/jupyter/.helmignore delete mode 100644 charts/jupyter/Chart.yaml delete mode 100644 charts/jupyter/values.yaml diff --git a/.github/workflows/on-pr-update.yaml b/.github/workflows/on-pr-update.yaml index 3aa85ac..214d36c 100644 --- a/.github/workflows/on-pr-update.yaml +++ b/.github/workflows/on-pr-update.yaml @@ -33,9 +33,6 @@ jobs: - 'containers/jupyterhub/**' - 'containers/custom-packages/**' - 'containers/files/**' - chart: - - './.github/workflows/on-pr-update.yaml' - - 'charts/**' secrets: slack-token: ${{ secrets.SLACK_TOKEN }} diff --git a/.github/workflows/on-release.yaml b/.github/workflows/on-release.yaml index 1909a7d..cd19733 100644 --- a/.github/workflows/on-release.yaml +++ b/.github/workflows/on-release.yaml @@ -32,9 +32,6 @@ jobs: - 'containers/jupyterhub/**' - 'containers/custom-packages/**' - 'containers/files/**' - chart: - - './.github/workflows/on-release.yaml' - - 'charts/**' secrets: slack-token: ${{ secrets.SLACK_TOKEN }} @@ -86,23 +83,3 @@ jobs: secrets: container-registry-token: ${{ secrets.HARBOR_TOKEN }} slack-token: ${{ secrets.SLACK_TOKEN }} - - chart: - # Build the chart and push it as x.y.z-rc - needs: changes - if: fromJSON(needs.changes.outputs.changes).chart == 'true' - uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-chart.yaml@v4.3.0 - with: - job-name: chart - chart-registry: ${{ vars.HARBOR_REGISTRY }} - chart-registry-user: ${{ vars.HARBOR_USER }} - chart-registry-project: ${{ vars.HARBOR_PROJECT }} - chart-registry-repo: ${{ vars.HARBOR_REPO }} - release-tag-format: 'DARE-Jupyter-Helm-${version}' - slack-channel: ${{ vars.SLACK_CHANNEL }} - chart: charts/jupyter - test-command: | - helm template $CHART --values charts/jupyter/values.yaml - secrets: - chart-registry-token: ${{ secrets.HARBOR_TOKEN }} - slack-token: ${{ secrets.SLACK_TOKEN }} diff --git a/charts/jupyter/.helmignore b/charts/jupyter/.helmignore deleted file mode 100644 index 2a2671c..0000000 --- a/charts/jupyter/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line.. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/jupyter/Chart.yaml b/charts/jupyter/Chart.yaml deleted file mode 100644 index 9e27343..0000000 --- a/charts/jupyter/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -appVersion: 1.1.2 -description: Helm chart for deploying DARE Control. -name: jupyter -type: application -version: 1.1.2 diff --git a/charts/jupyter/values.yaml b/charts/jupyter/values.yaml deleted file mode 100644 index e7746fa..0000000 --- a/charts/jupyter/values.yaml +++ /dev/null @@ -1,10 +0,0 @@ -jupyter: - enabled: true - - image: - repository: harbor.ukserp.ac.uk/dare/jupyter - tag: 1.3.3 - pullPolicy: IfNotPresent - pullSecret: "" - uid: 1001 - gid: 1001 From 96ee31822302573383836eddb07d37547681c346 Mon Sep 17 00:00:00 2001 From: joss Date: Tue, 31 Oct 2023 16:32:24 +0000 Subject: [PATCH 4/4] fix: plumbing --- .github/workflows/on-pr-update.yaml | 19 ------------------- containers/jupyterlab/gpu.Dockerfile | 0 containers/jupyterlab/sparkR.Dockerfile | 0 3 files changed, 19 deletions(-) delete mode 100644 containers/jupyterlab/gpu.Dockerfile delete mode 100644 containers/jupyterlab/sparkR.Dockerfile diff --git a/.github/workflows/on-pr-update.yaml b/.github/workflows/on-pr-update.yaml index 214d36c..ae26bfb 100644 --- a/.github/workflows/on-pr-update.yaml +++ b/.github/workflows/on-pr-update.yaml @@ -82,22 +82,3 @@ jobs: secrets: container-registry-token: ${{ secrets.HARBOR_TOKEN }} slack-token: ${{ secrets.SLACK_TOKEN }} - - chart: - # Build the chart and push it as :pr-42 and :pr-42-fe45b3h - needs: changes - if: fromJSON(needs.changes.outputs.changes).chart == 'true' - uses: SwanseaUniversityMedical/workflows/.github/workflows/on-pr-update-chart.yaml@v4.3.0 - with: - job-name: chart - chart: charts/jupyter - chart-registry: ${{ vars.HARBOR_REGISTRY }} - chart-registry-user: ${{ vars.HARBOR_USER }} - chart-registry-project: ${{ vars.HARBOR_PROJECT }} - chart-registry-repo: ${{ vars.HARBOR_REPO }} - slack-channel: ${{ vars.SLACK_CHANNEL }} - test-command: | - helm template $CHART --values charts/jupyter/values.yaml - secrets: - chart-registry-token: ${{ secrets.HARBOR_TOKEN }} - slack-token: ${{ secrets.SLACK_TOKEN }} diff --git a/containers/jupyterlab/gpu.Dockerfile b/containers/jupyterlab/gpu.Dockerfile deleted file mode 100644 index e69de29..0000000 diff --git a/containers/jupyterlab/sparkR.Dockerfile b/containers/jupyterlab/sparkR.Dockerfile deleted file mode 100644 index e69de29..0000000