Skip to content

Commit 4f38b44

Browse files
committed
Add GitHub action configuration for Jakarta Data CI
1 parent 2520c06 commit 4f38b44

File tree

4 files changed

+74
-0
lines changed

4 files changed

+74
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: WildFly todo-jakarta-data Quickstart CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
paths:
7+
- 'todo-jakarta-data/**'
8+
- '.github/workflows/quickstart_ci.yml'
9+
jobs:
10+
call-quickstart_ci:
11+
uses: ./.github/workflows/quickstart_ci.yml
12+
with:
13+
QUICKSTART_PATH: todo-jakarta-data
14+
TEST_PROVISIONED_SERVER: true
15+
TEST_OPENSHIFT: true
16+
MATRIX_OS: '"ubuntu-latest"'
17+
EXTRA_RUN_ARGS: '-DPOSTGRESQL_DATABASE=todos -DPOSTGRESQL_SERVICE_HOST=localhost -DPOSTGRESQL_SERVICE_PORT=5432 -DPOSTGRESQL_USER=todos -DPOSTGRESQL_PASSWORD=mysecretpassword -DPOSTGRESQL_DATASOURCE=ToDos'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
docker run --name todo-jakarta-data-db -e POSTGRES_USER=todos -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
postgresql:
2+
primary:
3+
podSecurityContext:
4+
enabled: true
5+
fsGroup: 1001
6+
containerSecurityContext:
7+
enabled: true
8+
runAsUser: 1001
9+
runAsGroup: 0
10+
runAsNonRoot: true
11+
allowPrivilegeEscalation: false
12+
seccompProfile:
13+
type: RuntimeDefault
14+
capabilities:
15+
drop:
16+
- ALL
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
function installPrerequisites()
2+
{
3+
echo "Adding bitnami repository"
4+
helm repo add bitnami https://charts.bitnami.com/bitnami
5+
6+
helm dependency update charts/
7+
}
8+
9+
function helmInstall() {
10+
application="${1}"
11+
helm_set_arguments="$2"
12+
13+
# TODO https://issues.redhat.com/browse/WFLY-18574 remove this when persistence is working
14+
helm_set_arguments="${helm_set_arguments} -f ../.ci/openshift-ci/build-root/scripts/qs-overrides/todo-jakarta-data/ci.yaml"
15+
16+
helm install "${application}" charts/ --wait --timeout="${helm_install_timeout}" ${helm_set_arguments}
17+
echo $?
18+
}
19+
20+
21+
22+
function cleanPrerequisites()
23+
{
24+
helm uninstall "${application}"
25+
helm repo remove bitnami
26+
}
27+
28+
function getHelmSetVariablePrefix() {
29+
echo "wildfly."
30+
}
31+
32+
function helmInstallFailed() {
33+
echo "----> Getting status of all pods"
34+
kubectl get pods
35+
echo "----> Checking logs for postgres pod"
36+
kubectl logs todo-jakarta-data-postgresql-0
37+
echo "----> Checking events"
38+
kubectl get events
39+
}

0 commit comments

Comments
 (0)