Skip to content

Initializr Helm Charts #131

Initializr Helm Charts

Initializr Helm Charts #131

name: Initializr Helm Charts
env:
TERM: xterm-256color
JDK_CURRENT: 17
JDK_DISTRO: 'temurin'
CAS_PROJECT_DB_URL_ENDPOINT: ${{ secrets.CAS_PROJECT_DB_URL_ENDPOINT }}
CAS_PROJECT_DB_API_KEY: ${{ secrets.CAS_PROJECT_DB_API_KEY }}
##########################################################################
on:
push:
branches: [ pr-* ]
schedule:
- cron: "0 0 * * 5"
##########################################################################
jobs:
cancel-previous-runs:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
##########################################################################
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ env.JDK_CURRENT }}
distribution: ${{ env.JDK_DISTRO }}
- name: Build Initializr
run: ./gradlew --build-cache --configure-on-demand --no-daemon clean build -x test -x javadoc -x check --parallel
- uses: actions/upload-artifact@v3
with:
name: binary-artifacts
path: ./**/build/libs/*.*
##########################################################################
latest-versions-cas:
runs-on: ubuntu-latest
needs: [ build ]
outputs:
supported-versions: ${{ steps.get-supported-versions.outputs.supported-versions }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ env.JDK_CURRENT }}
distribution: ${{ env.JDK_DISTRO }}
- uses: actions/download-artifact@v3
with:
name: binary-artifacts
- id: print-supported-versions
name: Print supported versions
run: ./gradlew --no-daemon -q latestCasVersions | jq
- id: get-supported-versions
name: Get supported versions for matrix
run: echo "supported-versions=$(./gradlew --no-daemon -q latestCasVersions)" >> $GITHUB_OUTPUT
##########################################################################
helm:
runs-on: ubuntu-latest
needs: [ latest-versions-cas ]
strategy:
fail-fast: false
matrix:
k3s-channel: [ stable, latest ]
env:
GOPATH: /home/runner/go
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ env.JDK_CURRENT }}
distribution: ${{ env.JDK_DISTRO }}
- uses: actions/download-artifact@v3
with:
name: binary-artifacts
- name: Install K3S and Helm
uses: jupyterhub/action-k3s-helm@v3
with:
# - k3s release channels at https://github.com/k3s-io/k3s/blob/HEAD/channel.yaml
k3s-channel: ${{ matrix.k3s-channel }}
traefik-enabled: false
- name: Build Images for Helm Chart
env:
HELM_CAS_VERSION: "${{ fromJSON(needs.latest-versions-cas.outputs.supported-versions).cas-version }}"
HELM_CAS_MGMT_VERSION: "${{ fromJSON(needs.latest-versions-cas.outputs.supported-versions).cas-mgmt-version }}"
run: ./ci/validate-helm-build-images.sh $HELM_CAS_VERSION $HELM_CAS_MGMT_VERSION
- name: Validate Helm Chart
run: ./ci/validate-helm.sh