-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
109 lines (104 loc) · 3.05 KB
/
.gitlab-ci.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
100
101
102
103
104
105
106
107
108
109
---
stages:
- static-analysis
- test
- build
- deploy
include:
- local: '/.gitlab-ci.static-analysis.yml'
- local: '/docs/gitlab-ci.yml'
# In order to simplify reviews,
# - Entries should be in stage order
# - Labels for new entries should be in the following order:
# - stage
# - extends
# - image
# - tags
# - parallel
# - dependencies
# - before_script
# - script
# - after_script
# - artifacts
# - rules
verify-code:
stage: test
image: registry.access.redhat.com/ubi9/openjdk-17:latest
tags: [docker]
variables:
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
MAVEN_MIRROR_URL: "https://agogos-nexus.apps.ocp4.prod.psi.redhat.com/repository/maven-public"
script:
- mvn spotless:check
- mvn verify -s ci_settings.xml -Dmaven.wagon.http.ssl.insecure=true
artifacts:
when: always
reports:
junit:
- ./**/target/surefire-reports/TEST-*.xml
- ./**/target/failsafe-reports/TEST-*.xml
rules:
# Run on changes to everything except the documentation
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
paths:
- .gitlab-ci.yml
- ./*.xml
- ./*.json
- cli/**/*
- core/**/*
- operator/**/*
- relays/**/*
- test/**/*
- webhooks/**/*
build-cli:
stage: build
image:
name: quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3-java17
entrypoint: ["/bin/sh", "-c"]
tags: [docker]
variables:
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
MAVEN_MIRROR_URL: "https://agogos-nexus.apps.ocp4.prod.psi.redhat.com/repository/maven-public"
script:
- ./mvnw clean package -pl cli -am -Pnative -s ci_settings.xml -Dmaven.wagon.http.ssl.insecure=true -Dnative-image.xmx=4g
- mv ./cli/target/agogosctl-runner ./cli/target/agogosctl
artifacts:
paths:
- cli/target/agogosctl
rules:
# Run on changes to everything except the documentation
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
paths:
- .gitlab-ci.yml
- ./*.xml
- ./*.json
- cli/**/*
- core/**/*
- node_modules/**/*
- operator/**/*
- relays/**/*
- test/**/*
- webhooks/**/*
build-webhooks:
stage: build
image:
name: quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:22.3-java17
entrypoint: ["/bin/sh", "-c"]
tags: [native-images]
variables:
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
MAVEN_MIRROR_URL: "https://agogos-nexus.apps.ocp4.prod.psi.redhat.com/repository/maven-public"
KUBERNETES_CPU_REQUEST: "1"
KUBERNETES_CPU_LIMIT: "2"
KUBERNETES_MEMORY_REQUEST: "3Gi"
KUBERNETES_MEMORY_LIMIT: "6Gi"
script:
- ./mvnw install -pl webhooks -am -Pnative -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true -Dquarkus.native.native-image-xmx=4g
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
paths:
- core/**/*
- webhooks/**/*