Skip to content

Commit

Permalink
Merge branch 'master' into chore-update-oath2proxy-to-7.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski committed Oct 3, 2023
2 parents 20876af + 41f5e99 commit eb47ee5
Show file tree
Hide file tree
Showing 26 changed files with 168 additions and 1,954 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
extra-values: ${{ steps.deploy-comment.outputs.extra-values}}
steps:
- id: deploy-comment
uses: SwissDataScienceCenter/renku-actions/check-pr-description@v1.6.0
uses: SwissDataScienceCenter/renku-actions/check-pr-description@v1.7.0
with:
string: /deploy
pr_ref: ${{ github.event.number }}
Expand All @@ -41,7 +41,7 @@ jobs:
url: https://renku-ci-nb-${{ github.event.number }}.dev.renku.ch
steps:
- name: deploy-pr
uses: SwissDataScienceCenter/renku-actions/deploy-renku@v1.6.0
uses: SwissDataScienceCenter/renku-actions/deploy-renku@v1.7.0
env:
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }}
Expand All @@ -50,7 +50,7 @@ jobs:
RANCHER_PROJECT_ID: ${{ secrets.CI_RANCHER_PROJECT }}
RENKU_RELEASE: renku-ci-nb-${{ github.event.number }}
RENKU_VALUES_FILE: "${{ github.workspace }}/values.yaml"
RENKU_VALUES: ${{ secrets.CI_RENKU_VALUES }}
RENKU_VALUES: ${{ secrets.COMBINED_CHARTS_CI_RENKU_VALUES }}
RENKUBOT_KUBECONFIG: ${{ secrets.RENKUBOT_DEV_KUBECONFIG }}
RENKUBOT_RANCHER_BEARER_TOKEN: ${{ secrets.RENKUBOT_RANCHER_BEARER_TOKEN }}
RANCHER_DEV_API_ENDPOINT: ${{ secrets.RANCHER_DEV_API_ENDPOINT }}
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
if: github.event.action != 'closed' && needs.check-deploy.outputs.pr-contains-string == 'true' && needs.check-deploy.outputs.test-enabled == 'true'
runs-on: ubuntu-22.04
steps:
- uses: SwissDataScienceCenter/renku-actions/test-renku@v1.6.0
- uses: SwissDataScienceCenter/renku-actions/test-renku@v1.7.0
with:
kubeconfig: ${{ secrets.RENKUBOT_DEV_KUBECONFIG }}
renku-release: renku-ci-nb-${{ github.event.number }}
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
steps:
- name: Extract Renku repository reference
run: echo "RENKU_REFERENCE=`echo '${{ needs.check-deploy.outputs.renku }}' | cut -d'@' -f2`" >> $GITHUB_ENV
- uses: SwissDataScienceCenter/renku-actions/test-renku-cypress@v1.6.0
- uses: SwissDataScienceCenter/renku-actions/test-renku-cypress@v1.7.0
with:
e2e-target: ${{ matrix.tests }}
renku-reference: ${{ env.RENKU_REFERENCE }}
Expand All @@ -128,7 +128,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: renku teardown
uses: SwissDataScienceCenter/renku-actions/cleanup-renku-ci-deployments@v1.6.0
uses: SwissDataScienceCenter/renku-actions/cleanup-renku-ci-deployments@v1.7.0
env:
HELM_RELEASE_REGEX: "^renku-ci-nb-${{ github.event.number }}$"
GITLAB_TOKEN: ${{ secrets.DEV_GITLAB_TOKEN }}
Expand Down
77 changes: 5 additions & 72 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,9 @@ jobs:
poetry run flake8 -v
poetry run pytest -v tests
test-chart:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Install helm
uses: azure/setup-helm@v3
- name: Test chart
run: |
helm dep update helm-chart/renku-notebooks
helm lint helm-chart/renku-notebooks
publish-chart-tagged:
publish-images:
runs-on: ubuntu-latest
needs:
- test-chart
- test
- test-git-proxy
- test-git-services
Expand All @@ -91,64 +75,13 @@ jobs:
run: |
echo "GIT_USER=Renku Bot" >> $GITHUB_ENV
echo "[email protected]" >> $GITHUB_ENV
- name: Push tagged chart and images
uses: SwissDataScienceCenter/renku-actions/publish-chart@v1.6.0
- name: Push images
uses: SwissDataScienceCenter/renku-actions/publish-chartpress-images@v1.7.0
env:
CHART_NAME: renku-notebooks
GITHUB_TOKEN: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}
- name: Wait for chart to get published
run: sleep 120
- name: Update component version
uses: SwissDataScienceCenter/renku-actions/update-component-version@v1.6.0
uses: SwissDataScienceCenter/renku-actions/update-component-version@v1.7.0
env:
CHART_NAME: renku-notebooks
COMPONENT_NAME: renku-notebooks
GITHUB_TOKEN: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}

push-latest-image:
runs-on: ubuntu-latest
needs: publish-chart-tagged
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- uses: actions/setup-python@v4
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ env.DOCKER_CACHE_PREFIX }}-${{ runner.os }}-buildx-${{ github.run_id }}
restore-keys: |
${{ env.DOCKER_CACHE_PREFIX }}-${{ runner.os }}-buildx-
- name: Add cache parameters to chartpress.yaml
run: |
curl -L https://github.com/mikefarah/yq/releases/download/v4.27.3/yq_linux_amd64 -o yq
chmod a+x yq
./yq -i '.charts[].images[].extraBuildCommandOptions |= ["--cache-from=type=local,src=/tmp/.buildx-cache", "--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max"]' chartpress.yaml
rm yq
cat chartpress.yaml
- uses: azure/setup-helm@v3
- uses: actions/setup-python@v2
with:
python-version: 3.8
cache: poetry
- name: Push latest image
env:
DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}
run: |
poetry install
echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin
helm dep update helm-chart/renku-notebooks
docker buildx create --use
poetry run chartpress --builder docker-buildx --push --tag latest
- name: Move cache
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
226 changes: 113 additions & 113 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,116 +1,116 @@
name: Integration tests
# name: Integration tests

on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
- closed
# on:
# pull_request:
# types:
# - opened
# - edited
# - synchronize
# - reopened
# - closed

env:
DOCKER_CACHE_PREFIX: "v1"
# env:
# DOCKER_CACHE_PREFIX: "v1"

jobs:
integration-test:
strategy:
matrix:
session-type: ["registered", "anonymous"]
if: github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Add cache parameters to chartpress.yaml
run: |
curl -L https://github.com/mikefarah/yq/releases/download/v4.27.3/yq_linux_amd64 -o yq
chmod a+x yq
./yq -i '.charts[].images[].extraBuildCommandOptions |= ["--cache-from=type=local,src=/tmp/.buildx-cache", "--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max"]' chartpress.yaml
rm yq
cat chartpress.yaml
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ env.DOCKER_CACHE_PREFIX }}-${{ runner.os }}-buildx-${{ github.run_id }}
restore-keys: |
${{ env.DOCKER_CACHE_PREFIX }}-${{ runner.os }}-buildx-
- uses: helm/[email protected]
with:
cluster_name: kind
wait: 10m0s
- name: Create values file
env:
OIDC_GITLAB_CLIENT_ID: ${{ secrets.OIDC_GITLAB_CLIENT_ID }}
OIDC_GITLAB_CLIENT_SECRET: ${{ secrets.OIDC_GITLAB_CLIENT_SECRET }}
RENKUBOT_DEV_GITLAB_ACCESS_TOKEN: ${{ secrets.RENKUBOT_DEV_GITLAB_ACCESS_TOKEN }}
run: |
cat <<EOF > test-values.yaml
amalthea:
scope:
namespaces: [default]
deployCrd: true
global:
anonymousSessions:
enabled: true
gateway:
clientSecret: test-dummy-client-secret
keycloak:
realm: Renku
userSessionPersistentVolumes:
enabled: true
storageClass: standard
gitlab:
registry:
host: registry.dev.renku.ch
url: https://gitlab.dev.renku.ch
oidc:
clientId: $OIDC_GITLAB_CLIENT_ID
clientSecret: $OIDC_GITLAB_CLIENT_SECRET
tokenUrl: https://gitlab.dev.renku.ch/oauth/token
authUrl: https://gitlab.dev.renku.ch/oauth/authorize
allowUnverifiedEmail: true
replicaCount: 1
sessionIngress:
host: test.host.com
tlsSecret: dummy-tls-secret
serverDefaults:
defaultUrl: /lab
lfs_auto_fetch: false
tests:
sessionTypes:
- ${{ matrix.session-type }}
enabled: true
oidc_issuer: https://gitlab.dev.renku.ch
gitlab_token: $RENKUBOT_DEV_GITLAB_ACCESS_TOKEN
debug: false
dummyStores: true
EOF
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: poetry
- name: Setup chartpress
run: |
poetry install
docker buildx create --use
poetry run chartpress --builder docker-buildx
poetry run chartpress --builder docker-buildx --list-images | xargs -n 1 kind load docker-image
- name: Move cache
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Install Helm Chart
run: |
helm dep update helm-chart/renku-notebooks
helm install renku-notebooks helm-chart/renku-notebooks -f test-values.yaml --wait --timeout 15m0s
- name: Helm Test
run: |
helm test renku-notebooks --timeout 60m0s --logs
# jobs:
# integration-test:
# strategy:
# matrix:
# session-type: ["registered", "anonymous"]
# if: github.event.action != 'closed'
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Code
# uses: actions/checkout@v3
# - name: Add cache parameters to chartpress.yaml
# run: |
# curl -L https://github.com/mikefarah/yq/releases/download/v4.27.3/yq_linux_amd64 -o yq
# chmod a+x yq
# ./yq -i '.charts[].images[].extraBuildCommandOptions |= ["--cache-from=type=local,src=/tmp/.buildx-cache", "--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max"]' chartpress.yaml
# rm yq
# cat chartpress.yaml
# - name: Cache Docker layers
# uses: actions/cache@v3
# with:
# path: /tmp/.buildx-cache
# key: ${{ env.DOCKER_CACHE_PREFIX }}-${{ runner.os }}-buildx-${{ github.run_id }}
# restore-keys: |
# ${{ env.DOCKER_CACHE_PREFIX }}-${{ runner.os }}-buildx-
# - uses: helm/[email protected]
# with:
# cluster_name: kind
# wait: 10m0s
# - name: Create values file
# env:
# OIDC_GITLAB_CLIENT_ID: ${{ secrets.OIDC_GITLAB_CLIENT_ID }}
# OIDC_GITLAB_CLIENT_SECRET: ${{ secrets.OIDC_GITLAB_CLIENT_SECRET }}
# RENKUBOT_DEV_GITLAB_ACCESS_TOKEN: ${{ secrets.RENKUBOT_DEV_GITLAB_ACCESS_TOKEN }}
# run: |
# cat <<EOF > test-values.yaml
# amalthea:
# scope:
# namespaces: [default]
# deployCrd: true
# global:
# anonymousSessions:
# enabled: true
# gateway:
# clientSecret: test-dummy-client-secret
# keycloak:
# realm: Renku
# userSessionPersistentVolumes:
# enabled: true
# storageClass: standard
# gitlab:
# registry:
# host: registry.dev.renku.ch
# url: https://gitlab.dev.renku.ch
# oidc:
# clientId: $OIDC_GITLAB_CLIENT_ID
# clientSecret: $OIDC_GITLAB_CLIENT_SECRET
# tokenUrl: https://gitlab.dev.renku.ch/oauth/token
# authUrl: https://gitlab.dev.renku.ch/oauth/authorize
# allowUnverifiedEmail: true
# replicaCount: 1
# sessionIngress:
# host: test.host.com
# tlsSecret: dummy-tls-secret
# serverDefaults:
# defaultUrl: /lab
# lfs_auto_fetch: false
# tests:
# sessionTypes:
# - ${{ matrix.session-type }}
# enabled: true
# oidc_issuer: https://gitlab.dev.renku.ch
# gitlab_token: $RENKUBOT_DEV_GITLAB_ACCESS_TOKEN
# debug: false
# dummyStores: true
# EOF
# - name: Install poetry
# run: |
# curl -sSL https://install.python-poetry.org | python3 -
# - uses: actions/setup-python@v4
# with:
# python-version: '3.8'
# cache: poetry
# - name: Setup chartpress
# run: |
# poetry install
# docker buildx create --use
# poetry run chartpress --builder docker-buildx
# poetry run chartpress --builder docker-buildx --list-images | xargs -n 1 kind load docker-image
# - name: Move cache
# # Temp fix
# # https://github.com/docker/build-push-action/issues/252
# # https://github.com/moby/buildkit/issues/1896
# run: |
# rm -rf /tmp/.buildx-cache
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache
# - name: Install Helm Chart
# run: |
# helm dep update helm-chart/renku-notebooks
# helm install renku-notebooks helm-chart/renku-notebooks -f test-values.yaml --wait --timeout 15m0s
# - name: Helm Test
# run: |
# helm test renku-notebooks --timeout 60m0s --logs
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog for renku-notebooks

## [1.19.1](https://github.com/SwissDataScienceCenter/renku-notebooks/compare/1.19.0...1.19.1) (2023-10-02)


### Bug Fixes

* **app:** fix a typo in session hibernation ([#1645](https://github.com/SwissDataScienceCenter/renku-notebooks/pull/1645)) ([47de9d4](https://github.com/SwissDataScienceCenter/renku-notebooks/commit/47de9d48fb410bb8e453c71e610360360eb28a8e))


## [1.19.0](https://github.com/SwissDataScienceCenter/renku-notebooks/compare/1.18.1...1.19.0) (2023-09-15)


Expand Down
Loading

0 comments on commit eb47ee5

Please sign in to comment.