Skip to content

feat(builds): add the possibility to configure insecure registries #16083

feat(builds): add the possibility to configure insecure registries

feat(builds): add the possibility to configure insecure registries #16083

name: Test PR
permissions:
contents: read
pull-requests: read
on:
pull_request:
types:
- opened
- synchronize
- reopened
- closed
- edited
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
docs: ${{ steps.filter.outputs.docs }}
steps:
# For pull requests it's not necessary to check out the code
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'docs/**'
test-docs:
needs: changes
name: Documentation
runs-on: ubuntu-24.04
if: ${{github.event.action != 'closed' && needs.changes.outputs.docs == 'true'}}
defaults:
run:
working-directory: docs/
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Install dependencies
run: npm clean-install
- name: Check docs formatting
run: npm run format:check
- name: Test docs spelling
run: npm run spell-check
- name: Test the docs build
run: npm run build
check-deploy:
name: Analyze deploy strings
runs-on: ubuntu-24.04
outputs:
deploy: ${{ steps.deploy-comment.outputs.pr-contains-string }}
renku-core: ${{ steps.deploy-comment.outputs.renku-core }}
renku-gateway: ${{ steps.deploy-comment.outputs.renku-gateway }}
renku-graph: ${{ steps.deploy-comment.outputs.renku-graph }}
renku-notebooks: ${{ steps.deploy-comment.outputs.renku-notebooks }}
renku-ui: ${{ steps.deploy-comment.outputs.renku-ui }}
renku-data-services: ${{ steps.deploy-comment.outputs.renku-data-services }}
amalthea: ${{ steps.deploy-comment.outputs.amalthea }}
amalthea-sessions: ${{ steps.deploy-comment.outputs.amalthea-sessions }}
test-enabled: ${{ steps.deploy-comment.outputs.test-enabled == 'true' }}
test-slow-enabled: ${{ steps.deploy-comment.outputs.test-slow-enabled == 'true' }}
extra-values: ${{ steps.deploy-comment.outputs.extra-values }}
steps:
- id: deploy-comment
uses: SwissDataScienceCenter/renku-actions/check-pr-description@v1.23.0
with:
pr_ref: ${{ github.event.number }}
deploy-pr:
name: Deploy on Azure
runs-on: ubuntu-24.04
needs: [check-deploy]
permissions:
pull-requests: write
id-token: write
if: github.event.action != 'closed'
steps:
- uses: actions/checkout@v5
- name: Find deployment url
if: needs.check-deploy.outputs.deploy == 'true'
uses: peter-evans/find-comment@v3
id: deploymentUrlMessage
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "RenkuBot"
body-includes: "You can access the deployment of this PR at"
- name: Create comment deployment url
if: steps.deploymentUrlMessage.outputs.comment-id == 0 &&
needs.check-deploy.outputs.deploy == 'true'
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
You can access the deployment of this PR at ${{ format('https://ci-renku-{0}.dev.renku.ch', github.event.number) }}
- name: Azure login
if: needs.check-deploy.outputs.deploy == 'true'
uses: azure/login@v2
with:
client-id: ${{ secrets.CI_RENKU_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.CI_RENKU_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.CI_RENKU_AZURE_SUBSCRIPTION_ID }}
- uses: azure/aks-set-context@v4
if: needs.check-deploy.outputs.deploy == 'true'
with:
resource-group: "renku-dev"
cluster-name: "aks-switzerlandnorth-renku-dev"
- name: Get AKS credentials
if: needs.check-deploy.outputs.deploy == 'true'
run: |
az aks get-credentials --resource-group renku-dev --name aks-switzerlandnorth-renku-dev --file "${{ github.workspace }}/renkubot-kube.config"
chmod 400 "${{ github.workspace }}/renkubot-kube.config"
- name: renku build and deploy
if: needs.check-deploy.outputs.deploy == 'true'
uses: SwissDataScienceCenter/renku-actions/deploy-renku@v1.23.0
env:
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }}
KUBECONFIG: "${{ github.workspace }}/renkubot-kube.config"
RENKU_RELEASE: ci-renku-${{ github.event.number }}
RENKU_VALUES_FILE: "${{ github.workspace }}/values.yaml"
RENKU_VALUES: minimal-deployment/minimal-deployment-values.yaml
TEST_ARTIFACTS_PATH: "tests-artifacts-${{ github.sha }}"
KUBERNETES_CLUSTER_FQDN: "dev.renku.ch"
RENKU_ANONYMOUS_SESSIONS: "true"
renku: "@${{ github.head_ref }}"
renku_core: "${{ needs.check-deploy.outputs.renku-core }}"
renku_gateway: "${{ needs.check-deploy.outputs.renku-gateway }}"
renku_graph: "${{ needs.check-deploy.outputs.renku-graph }}"
renku_notebooks: "${{ needs.check-deploy.outputs.renku-notebooks }}"
renku_ui: "${{ needs.check-deploy.outputs.renku-ui }}"
renku_data_services: "${{ needs.check-deploy.outputs.renku-data-services }}"
amalthea: "${{ needs.check-deploy.outputs.amalthea }}"
amalthea_sessions: "${{ needs.check-deploy.outputs.amalthea-sessions }}"
extra_values: "${{ needs.check-deploy.outputs.extra-values }}"
cypress-acceptance-tests:
name: Cypress acceptance tests
runs-on: ubuntu-24.04
needs: [check-deploy, deploy-pr]
strategy:
fail-fast: false
matrix:
tests:
[
anonymousNavigation,
codeRepositories,
dashboard,
dataConnectors,
groups,
projects,
search,
sessionLaunchers,
sessions,
]
steps:
- uses: SwissDataScienceCenter/renku-actions/test-renku-cypress@v1.23.0
if: github.event.action != 'closed' && needs.check-deploy.outputs.deploy == 'true' && needs.check-deploy.outputs.test-enabled == 'true'
with:
e2e-folder: cypress/e2e/v2/
e2e-target: ${{ matrix.tests }}
kubernetes-cluster-fqdn: ${{ needs.check-deploy.outputs.deploy == 'true' && 'dev.renku.ch' }}
renku-reference: ${{ github.ref }}
renku-release: ci-renku-${{ github.event.number }}
test-user-password: ${{ secrets.RENKU_BOT_DEV_PASSWORD }}
cypress-acceptance-tests-slow:
name: Cypress slow acceptance tests
if: github.event.action != 'closed' && needs.check-deploy.outputs.deploy == 'true' && needs.check-deploy.outputs.test-enabled == 'true' && needs.check-deploy.outputs.test-slow-enabled == 'true'
runs-on: ubuntu-24.04
needs: [check-deploy, deploy-pr]
permissions:
pull-requests: write
id-token: write
env:
KUBECONFIG: "${{ github.workspace }}/renkubot-kube.config"
strategy:
fail-fast: false
matrix:
tests: [sessions, sessionSecrets]
steps:
- name: Azure login
uses: azure/login@v2
with:
client-id: ${{ secrets.CI_RENKU_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.CI_RENKU_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.CI_RENKU_AZURE_SUBSCRIPTION_ID }}
- name: Set AKS context
uses: azure/aks-set-context@v4
with:
resource-group: "renku-dev"
cluster-name: "aks-switzerlandnorth-renku-dev"
- name: Get AKS credentials
run: |
az aks get-credentials --resource-group renku-dev --name aks-switzerlandnorth-renku-dev --file "${{ github.workspace }}/renkubot-kube.config"
chmod 400 "${{ github.workspace }}/renkubot-kube.config"
- name: Install kubectl
uses: azure/setup-kubectl@v4
with:
version: "latest"
- name: Check kubectl config and access to cluster
run: kubectl get pods -A
- name: Run Cypress slow tests
uses: SwissDataScienceCenter/renku-actions/test-renku-cypress@v1.23.0
with:
e2e-folder: cypress/e2e/slow/
e2e-target: ${{ matrix.tests }}
kubernetes-cluster-fqdn: ${{ needs.check-deploy.outputs.deploy == 'true' && 'dev.renku.ch' }}
renku-reference: ${{ github.ref }}
renku-release: ci-renku-${{ github.event.number }}
test-user-password: ${{ secrets.RENKU_BOT_DEV_PASSWORD }}
deploy-string-no-custom-version:
name: Ensure no custom components
runs-on: ubuntu-24.04
needs: [check-deploy]
steps:
- name: Check deploy string
if: ${{
needs.check-deploy.outputs.deploy == 'true'
&& startsWith(github.base_ref, 'release-')
&& (
needs.check-deploy.outputs.renku-core != null
|| needs.check-deploy.outputs.renku-gateway != null
|| needs.check-deploy.outputs.renku-graph != null
|| needs.check-deploy.outputs.renku-notebooks != null
|| needs.check-deploy.outputs.renku-ui != null
|| needs.check-deploy.outputs.renku-data-services != null
)
}}
uses: actions/github-script@v7
with:
script: core.setFailed('Cannot merge release PR if it still has custom versions in deploy string.')
cleanup:
name: Cleanup
runs-on: ubuntu-24.04
needs: [check-deploy]
if: github.event.action == 'closed' && needs.check-deploy.outputs.deploy == 'true'
permissions:
pull-requests: write
id-token: write
steps:
- name: Find deployment url
uses: peter-evans/find-comment@v3
id: deploymentUrlMessage
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "RenkuBot"
body-includes: "Tearing down the temporary RenkuLab deployment"
- name: Create comment deployment url
if: steps.deploymentUrlMessage.outputs.comment-id == 0
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Tearing down the temporary RenkuLab deployment for this PR.
# Azure-specific setup
- name: Azure login
if: needs.check-deploy.outputs.deploy == 'true'
uses: azure/login@v2
with:
client-id: ${{ secrets.CI_RENKU_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.CI_RENKU_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.CI_RENKU_AZURE_SUBSCRIPTION_ID }}
- uses: azure/aks-set-context@v4
if: needs.check-deploy.outputs.deploy == 'true'
with:
resource-group: "renku-dev"
cluster-name: "aks-switzerlandnorth-renku-dev"
- name: Get AKS credentials
if: needs.check-deploy.outputs.deploy == 'true'
run: |
az aks get-credentials --resource-group renku-dev --name aks-switzerlandnorth-renku-dev --file "${{ github.workspace }}/renkubot-kube.config"
chmod 400 "${{ github.workspace }}/renkubot-kube.config"
# Cleanup Azure deployments
- name: renku teardown
uses: SwissDataScienceCenter/renku-actions/cleanup-renku-ci-deployments@v1.23.0
env:
HELM_RELEASE_REGEX: "^ci-renku-${{ github.event.number }}$"
KUBECONFIG: "${{ github.workspace }}/renkubot-kube.config"
MAX_AGE_SECONDS: 0
DELETE_NAMESPACE: "true"