-
Notifications
You must be signed in to change notification settings - Fork 33
94 lines (88 loc) · 3.2 KB
/
initializr-helm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Initializr Helm Charts
env:
TERM: xterm-256color
JDK_CURRENT: 21
JDK_DISTRO: 'corretto'
CAS_MODULE_METADATA_MONGODB_URL: ${{ secrets.CAS_MODULE_METADATA_MONGODB_URL }}
##########################################################################
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 $HELM_CAS_VERSION