-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into chore-update-oath2proxy-to-7.5.1
- Loading branch information
Showing
26 changed files
with
168 additions
and
1,954 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.