From eef0427f90a5000098724f61946792b0af26f710 Mon Sep 17 00:00:00 2001 From: Joss Whittle Date: Tue, 31 Oct 2023 16:33:01 +0000 Subject: [PATCH] fix: Update ci not releasing jupyterhub container (#65) --- .github/workflows/on-pr-update.yaml | 39 ++++++------------ .github/workflows/on-release.yaml | 53 ++++++++++++------------- charts/jupyter/.helmignore | 23 ----------- charts/jupyter/Chart.yaml | 6 --- charts/jupyter/values.yaml | 10 ----- containers/jupyterlab/gpu.Dockerfile | 0 containers/jupyterlab/sparkR.Dockerfile | 0 7 files changed, 38 insertions(+), 93 deletions(-) delete mode 100644 charts/jupyter/.helmignore delete mode 100644 charts/jupyter/Chart.yaml delete mode 100644 charts/jupyter/values.yaml 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 2cb0fec..ae26bfb 100644 --- a/.github/workflows/on-pr-update.yaml +++ b/.github/workflows/on-pr-update.yaml @@ -23,12 +23,16 @@ jobs: with: slack-channel: ${{ vars.SLACK_CHANNEL }} filters: | - container: + jupyter-container: - './.github/workflows/on-pr-update.yaml' - - 'containers/**' - chart: - - './.github/workflows/on-pr-update.yaml' - - 'charts/**' + - 'containers/jupyterlab/**' + - 'containers/custom-packages/**' + - 'containers/files/**' + jupyterhub-container: + - './.github/workflows/on-pr-update.yaml' + - 'containers/jupyterhub/**' + - 'containers/custom-packages/**' + - 'containers/files/**' secrets: slack-token: ${{ secrets.SLACK_TOKEN }} @@ -36,7 +40,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 +63,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 && @@ -78,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/** - 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/.github/workflows/on-release.yaml b/.github/workflows/on-release.yaml index afa6031..cd19733 100644 --- a/.github/workflows/on-release.yaml +++ b/.github/workflows/on-release.yaml @@ -24,19 +24,18 @@ jobs: filters: | jupyter-container: - './.github/workflows/on-release.yaml' - - 'containers/**' - - 'plugins/**' - chart: + - 'containers/jupyterlab/**' + - 'containers/custom-packages/**' + - 'containers/files/**' + jupyterhub-container: - './.github/workflows/on-release.yaml' - - 'charts/**' + - 'containers/jupyterhub/**' + - 'containers/custom-packages/**' + - 'containers/files/**' 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 +46,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,26 +60,26 @@ jobs: container-registry-token: ${{ secrets.HARBOR_TOKEN }} slack-token: ${{ secrets.SLACK_TOKEN }} - ###################################################################################################################### - # Chart Tasks - ###################################################################################################################### - - chart: - # Build the chart and push it as x.y.z-rc + jupyterhub-container: + # Build the DARE Jupyter container and push it as :rc-1.0.0 needs: changes - if: fromJSON(needs.changes.outputs.changes).chart == 'true' - uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-chart.yaml@v4.3.0 + if: fromJSON(needs.changes.outputs.changes).jupyterhub-container == 'true' + uses: SwanseaUniversityMedical/workflows/.github/workflows/on-release-container.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}' + 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 }} - chart: charts/** - test-command: | - helm template $CHART --values charts/jupyter/values.yaml + 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: - chart-registry-token: ${{ secrets.HARBOR_TOKEN }} + container-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 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