-
Notifications
You must be signed in to change notification settings - Fork 33
99 lines (94 loc) · 3.38 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
95
96
97
98
99
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