Skip to content

Commit 40d097e

Browse files
authored
Add renovate configuration & PR test checks (#33)
* Add ci.yaml * Add registry validation workflow * Add renovate.json Signed-off-by: thepetk <[email protected]> * Fix versions of actions * Align ci with dotnet * Merge all steps * Remove odo version var * Add non-terminating check --------- Signed-off-by: thepetk <[email protected]>
1 parent 361a839 commit 40d097e

File tree

3 files changed

+152
-0
lines changed

3 files changed

+152
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Quarkus CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
ci:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
21+
- name: Set up JDK 17
22+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
23+
with:
24+
java-version: "17"
25+
distribution: "temurin"
26+
cache: maven
27+
28+
- name: Make mvnw executable
29+
run: chmod +x ./mvnw
30+
31+
- name: Build with Maven
32+
run: ./mvnw clean package -B
33+
34+
- name: Build Docker image
35+
run: docker build -f src/main/docker/Dockerfile.jvm.staged -t quarkus-app .
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Validate with Registry
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
env:
10+
MINIKUBE_VERSION: "v1.29.0"
11+
MINIKUBE_RESOURCES: "--memory 14gb --cpus 4"
12+
KUBERNETES_VERSION: "v1.25.2"
13+
TEST_DELTA: false
14+
REGISTRY_PATH: ${{ github.workspace }}/registry
15+
GO_VERSION: "1.23"
16+
GINKGO_VERSION: v2.19.0
17+
YQ_VERSION: v4.44.1
18+
19+
jobs:
20+
validate-devfile:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
27+
- name: Checkout current repo
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
with:
30+
path: current-repo
31+
32+
- name: Checkout devfile registry
33+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+
with:
35+
repository: devfile/registry
36+
path: ${{ env.REGISTRY_PATH }}
37+
38+
- name: Setup Go
39+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
40+
with:
41+
go-version: ${{ env.GO_VERSION }}
42+
43+
- name: Install yq
44+
run: |
45+
curl -sL -O https://github.com/mikefarah/yq/releases/download/${{ env.YQ_VERSION }}/yq_linux_amd64 -o /usr/local/bin/yq && mv ./yq_linux_amd64 /usr/local/bin/yq && chmod +x /usr/local/bin/yq
46+
47+
- name: Install Ginkgo
48+
run: go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
49+
50+
- name: Validate sample
51+
run: (cd ${{ env.REGISTRY_PATH }} && bash tests/validate_devfile_schemas.sh --stacksPath ${{ github.workspace }} --stackDirs current-repo)
52+
53+
non-terminating:
54+
name: check for non-terminating images
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59+
with:
60+
path: current-repo
61+
fetch-depth: 0
62+
63+
- name: Checkout devfile registry
64+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
65+
with:
66+
repository: devfile/registry
67+
path: ${{ env.REGISTRY_PATH }}
68+
69+
- name: Setup Go
70+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
71+
with:
72+
go-version: ${{ env.GO_VERSION }}
73+
74+
- name: Setup Minikube
75+
uses: manusa/actions-setup-minikube@0e8062ceff873bd77979f39cf8fd3621416afe4d # v2.13.0
76+
with:
77+
minikube version: ${{ env.MINIKUBE_VERSION }}
78+
kubernetes version: ${{ env.KUBERNETES_VERSION }}
79+
driver: "docker"
80+
github token: ${{ secrets.GITHUB_TOKEN }}
81+
start args: "--addons=ingress ${{ env.MINIKUBE_RESOURCES }}"
82+
83+
- name: Check that containers components are non terminating
84+
run: |
85+
go build -C ${{ env.REGISTRY_PATH }}/tests/check_non_terminating -o flatten-parent
86+
(cd ${{ env.REGISTRY_PATH }} && bash ${{ env.REGISTRY_PATH }}/tests/check_non_terminating.sh --stacksPath ${{ github.workspace }} --stackDirs current-repo)

renovate.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["local>devfile-samples/.github:renovate-config"],
4+
"enabledManagers": ["maven", "dockerfile"],
5+
"packageRules": [
6+
{
7+
"matchManagers": ["maven"],
8+
"groupName": "maven dependencies",
9+
"groupSlug": "maven-deps",
10+
"commitMessageTopic": "Maven {{depName}}"
11+
},
12+
{
13+
"matchManagers": ["dockerfile"],
14+
"groupName": "dockerfile dependencies",
15+
"groupSlug": "dockerfile-deps",
16+
"commitMessageTopic": "Dockerfile {{depName}}"
17+
},
18+
{
19+
"matchManagers": ["maven"],
20+
"matchUpdateTypes": ["major"],
21+
"matchBaseBranches": "main",
22+
"enabled": false
23+
},
24+
{
25+
"matchManagers": ["dockerfile"],
26+
"matchUpdateTypes": ["major"],
27+
"matchBaseBranches": "main",
28+
"enabled": false
29+
}
30+
]
31+
}

0 commit comments

Comments
 (0)