Initializr Helm Charts #186
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
name: Initializr Helm Charts | |
env: | |
TERM: xterm-256color | |
JDK_CURRENT: 21 | |
JDK_DISTRO: 'corretto' | |
CAS_PROJECT_DB_URL_ENDPOINT: ${{ secrets.CAS_PROJECT_DB_URL_ENDPOINT }} | |
CAS_PROJECT_DB_API_KEY: ${{ secrets.CAS_PROJECT_DB_API_KEY }} | |
########################################################################## | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ pr-* ] | |
schedule: | |
- cron: "0 0 * * 5" | |
concurrency: | |
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}" | |
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'apereo/cas-initializr' }} | |
########################################################################## | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
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@v4 | |
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@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ env.JDK_CURRENT }} | |
distribution: ${{ env.JDK_DISTRO }} | |
- uses: actions/download-artifact@v4 | |
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@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ env.JDK_CURRENT }} | |
distribution: ${{ env.JDK_DISTRO }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: binary-artifacts | |
- name: Install K3S and Helm | |
uses: jupyterhub/action-k3s-helm@v4 | |
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 }}" | |
run: ./ci/validate-helm-build-images.sh $HELM_CAS_VERSION | |
- name: Validate Helm Chart | |
run: ./ci/validate-helm.sh |