Skip to content

Commit cdb0ead

Browse files
authored
Merge pull request #1970 from johnoliver/checker
2 parents 3d03d33 + 819f4e9 commit cdb0ead

4 files changed

Lines changed: 867 additions & 0 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Staging Live Checker
2+
3+
Compares responses from the staging API against the live API to verify they are in sync.
4+
5+
## Build
6+
7+
From the project root (the staging checker requires the `staging-checker` and `adoptium` profiles):
8+
9+
```bash
10+
./mvnw package -Pstaging-checker,adoptium -pl adoptium-api-v3-staging-checker -am -DskipTests
11+
```
12+
13+
## Run
14+
15+
```bash
16+
java -cp adoptium-api-v3-staging-checker/target/adoptium-api-v3-staging-checker-*-jar-with-dependencies.jar \
17+
net.adoptium.api.v3.checker.StagingLiveChecker
18+
```
19+
20+
## Usage
21+
22+
```
23+
Usage: StagingLiveChecker [vendor] [options]
24+
25+
Vendor (first positional argument):
26+
adoptium Use Adoptium staging/live URLs (default)
27+
adoptopenjdk Use AdoptOpenJDK staging/live URLs
28+
29+
Options:
30+
--staging-url <url> Override the staging API base URL
31+
--live-url <url> Override the live API base URL
32+
--versions <v1,v2,...> Comma-separated list of Java versions to check
33+
(default: 8,11,17,21,22,23,24,25)
34+
--help, -h Show this help message and exit
35+
```
36+
37+
## Examples
38+
39+
Check Adoptium with default versions:
40+
41+
```bash
42+
java -cp ...jar net.adoptium.api.v3.checker.StagingLiveChecker
43+
```
44+
45+
Check AdoptOpenJDK:
46+
47+
```bash
48+
java -cp ...jar net.adoptium.api.v3.checker.StagingLiveChecker adoptopenjdk
49+
```
50+
51+
Check specific versions only:
52+
53+
```bash
54+
java -cp ...jar net.adoptium.api.v3.checker.StagingLiveChecker adoptium --versions 11,17,21
55+
```
56+
57+
Use custom staging and live URLs:
58+
59+
```bash
60+
java -cp ...jar net.adoptium.api.v3.checker.StagingLiveChecker \
61+
--staging-url https://my-staging.example.com \
62+
--live-url https://my-live.example.com
63+
```
64+
65+
## Exit Codes
66+
67+
- `0` — All URL checks passed.
68+
- `1` — One or more URL checks failed. Failed URLs are listed in the summary output.
69+
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<?xml version="1.0"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>net.adoptium.api</groupId>
7+
<artifactId>adoptium-api-v3</artifactId>
8+
<version>3.0.1-SNAPSHOT</version>
9+
<relativePath>../pom.xml</relativePath>
10+
</parent>
11+
12+
<artifactId>adoptium-api-v3-staging-checker</artifactId>
13+
14+
<properties>
15+
<main.class>net.adoptium.api.v3.checker.StagingLiveChecker</main.class>
16+
<quarkus.package.jar.type>uber-jar</quarkus.package.jar.type>
17+
<quarkus.package.runner-suffix>-jar-with-dependencies</quarkus.package.runner-suffix>
18+
</properties>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>io.quarkus</groupId>
23+
<artifactId>quarkus-rest</artifactId>
24+
</dependency>
25+
<dependency>
26+
<groupId>io.quarkus</groupId>
27+
<artifactId>quarkus-kotlin</artifactId>
28+
</dependency>
29+
<dependency>
30+
<groupId>org.jetbrains.kotlinx</groupId>
31+
<artifactId>kotlinx-coroutines-core</artifactId>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.jboss.weld.se</groupId>
35+
<artifactId>weld-se-core</artifactId>
36+
</dependency>
37+
<dependency>
38+
<groupId>org.awaitility</groupId>
39+
<artifactId>awaitility</artifactId>
40+
<scope>test</scope>
41+
</dependency>
42+
<dependency>
43+
<groupId>org.jboss.weld</groupId>
44+
<artifactId>weld-junit5</artifactId>
45+
<scope>test</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>org.assertj</groupId>
49+
<artifactId>assertj-core</artifactId>
50+
<scope>test</scope>
51+
</dependency>
52+
<dependency>
53+
<groupId>org.junit.jupiter</groupId>
54+
<artifactId>junit-jupiter-api</artifactId>
55+
<scope>test</scope>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.junit.jupiter</groupId>
59+
<artifactId>junit-jupiter-engine</artifactId>
60+
<scope>test</scope>
61+
</dependency>
62+
<dependency>
63+
<groupId>org.junit.platform</groupId>
64+
<artifactId>junit-platform-engine</artifactId>
65+
<scope>test</scope>
66+
</dependency>
67+
<dependency>
68+
<groupId>org.junit.platform</groupId>
69+
<artifactId>junit-platform-commons</artifactId>
70+
<scope>test</scope>
71+
</dependency>
72+
<dependency>
73+
<groupId>io.quarkus</groupId>
74+
<artifactId>quarkus-junit5</artifactId>
75+
<scope>test</scope>
76+
<exclusions>
77+
<exclusion>
78+
<groupId>org.jboss.logging</groupId>
79+
<artifactId>jboss-logging</artifactId>
80+
</exclusion>
81+
</exclusions>
82+
</dependency>
83+
<dependency>
84+
<groupId>io.rest-assured</groupId>
85+
<artifactId>rest-assured</artifactId>
86+
<scope>test</scope>
87+
</dependency>
88+
<dependency>
89+
<groupId>io.quarkus</groupId>
90+
<artifactId>quarkus-elytron-security-properties-file</artifactId>
91+
</dependency>
92+
<dependency>
93+
<groupId>org.skyscreamer</groupId>
94+
<artifactId>jsonassert</artifactId>
95+
<scope>compile</scope>
96+
</dependency>
97+
<dependency>
98+
<groupId>com.google.code.gson</groupId>
99+
<artifactId>gson</artifactId>
100+
</dependency>
101+
<dependency>
102+
<groupId>net.adoptium.api</groupId>
103+
<artifactId>adoptium-http-client-datasource</artifactId>
104+
<version>${project.version}</version>
105+
<scope>compile</scope>
106+
</dependency>
107+
<dependency>
108+
<groupId>org.jetbrains.kotlin</groupId>
109+
<artifactId>kotlin-stdlib-jdk8</artifactId>
110+
<version>${kotlin.version}</version>
111+
</dependency>
112+
<dependency>
113+
<groupId>org.jetbrains.kotlin</groupId>
114+
<artifactId>kotlin-test</artifactId>
115+
<version>${kotlin.version}</version>
116+
<scope>test</scope>
117+
</dependency>
118+
</dependencies>
119+
120+
<build>
121+
<sourceDirectory>src/main/kotlin</sourceDirectory>
122+
<plugins>
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-jar-plugin</artifactId>
126+
<executions>
127+
<execution>
128+
<id>test</id>
129+
<goals>
130+
<goal>test-jar</goal>
131+
</goals>
132+
</execution>
133+
<execution>
134+
<id>jar</id>
135+
<goals>
136+
<goal>jar</goal>
137+
</goals>
138+
<configuration>
139+
<classifier>classes</classifier>
140+
<excludes>
141+
<exclude>**/V3Updater**</exclude>
142+
<exclude>**/KickOffUpdate**</exclude>
143+
<exclude>**/UpdateTrigger**</exclude>
144+
</excludes>
145+
</configuration>
146+
</execution>
147+
</executions>
148+
</plugin>
149+
<plugin>
150+
<groupId>io.quarkus</groupId>
151+
<artifactId>quarkus-maven-plugin</artifactId>
152+
<extensions>true</extensions>
153+
<executions>
154+
<execution>
155+
<goals>
156+
<goal>build</goal>
157+
<goal>generate-code</goal>
158+
<goal>generate-code-tests</goal>
159+
</goals>
160+
</execution>
161+
</executions>
162+
</plugin>
163+
<plugin>
164+
<groupId>org.jetbrains.kotlin</groupId>
165+
<artifactId>kotlin-maven-plugin</artifactId>
166+
<version>${kotlin.version}</version>
167+
<executions>
168+
<execution>
169+
<id>compile</id>
170+
<phase>compile</phase>
171+
<goals>
172+
<goal>compile</goal>
173+
</goals>
174+
<configuration>
175+
<sourceDirs>
176+
<source>src/main/kotlin</source>
177+
<source>target/generated-sources/annotations</source>
178+
</sourceDirs>
179+
</configuration>
180+
</execution>
181+
<execution>
182+
<id>test-compile</id>
183+
<phase>test-compile</phase>
184+
<goals>
185+
<goal>test-compile</goal>
186+
</goals>
187+
</execution>
188+
</executions>
189+
<configuration>
190+
<jvmTarget>1.8</jvmTarget>
191+
</configuration>
192+
</plugin>
193+
</plugins>
194+
</build>
195+
</project>

0 commit comments

Comments
 (0)