Skip to content

Commit 9ea6e5d

Browse files
committed
Add Github Actions
1 parent db0bc4e commit 9ea6e5d

File tree

7 files changed

+183
-97
lines changed

7 files changed

+183
-97
lines changed

.github/dependabot.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
9+
# Maintain dependencies for Maven
10+
- package-ecosystem: "maven"
11+
directory: "/"
12+
schedule:
13+
interval: "daily"
14+
open-pull-requests-limit: 10
15+
16+
# Maintain dependencies for GitHub Actions
17+
- package-ecosystem: "github-actions"
18+
# Set the directory to / to check for workflow files stored in the default location of `.github/workflows`
19+
directory: "/"
20+
schedule:
21+
interval: "daily"

.github/workflows/maven.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Deploy Maven site to GitHub Pages
2+
3+
on: workflow_dispatch
4+
concurrency:
5+
group: github-pages
6+
cancel-in-progress: false
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
jobs:
12+
test:
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up JDK 21
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: 21
20+
distribution: 'temurin'
21+
cache: maven
22+
- name: Test with Maven
23+
run: mvn clean test --file pom.xml
24+
build:
25+
runs-on: ubuntu-24.04
26+
needs: test
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: Set up JDK 21
30+
uses: actions/setup-java@v4
31+
with:
32+
java-version: 21
33+
distribution: 'temurin'
34+
cache: maven
35+
- name: Deploy site
36+
run: mvn clean site --file pom.xml
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v5
39+
- name: Upload Artifacts
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: ./target/site
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4
46+
deploy:
47+
runs-on: ubuntu-24.04
48+
needs: build
49+
permissions:
50+
contents: read
51+
packages: write
52+
steps:
53+
- uses: actions/checkout@v4
54+
- run: sed -i 's|http://localhost:8080/|${{ secrets.TOMCAT_HOST }}|g' pom.xml
55+
- name: Set up Maven Central Repository
56+
uses: actions/setup-java@v4
57+
with:
58+
java-version: 21
59+
distribution: 'temurin'
60+
cache: maven
61+
server-id: TomcatServer
62+
server-username: MAVEN_USERNAME
63+
server-password: MAVEN_PASSWORD
64+
- name: Deploy package
65+
run: mvn --batch-mode tomcat7:deploy
66+
env:
67+
MAVEN_USERNAME: ${{ secrets.TOMCAT_USER }}
68+
MAVEN_PASSWORD: ${{ secrets.TOMCAT_PASS }}

.github/workflows/test.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Java Test with Maven
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- run: sed -i 's|http://localhost:8080/|${{ secrets.TOMCAT_HOST }}|g' pom.xml
14+
- name: Set up JDK 22
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: 22
18+
distribution: temurin
19+
cache: maven
20+
- name: Test with Maven
21+
run: mvn clean test --file pom.xml

Procfile

-1
This file was deleted.

pom.xml

+73-32
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,54 @@
1111
<groupId>org.coderic.hub</groupId>
1212
<artifactId>core</artifactId>
1313
<version>0.0.1-SNAPSHOT</version>
14+
<packaging>war</packaging>
1415
<name>Coderic Hub</name>
1516
<description>Coderic Hub Core</description>
16-
<url/>
17+
<url>https://github.com/Coderic/org.coderic.hub.core</url>
18+
<organization>
19+
<name>Coderic</name>
20+
<url>https://coderic.org/</url>
21+
</organization>
22+
<inceptionYear>2025</inceptionYear>
1723
<licenses>
18-
<license/>
24+
<license>
25+
<name>The GNU GPL3 license</name>
26+
<url>https://www.gnu.org/licenses/gpl-3.0.txt</url>
27+
<distribution>repo</distribution>
28+
</license>
1929
</licenses>
2030
<developers>
21-
<developer/>
31+
<developer>
32+
<id>neftaliyagua</id>
33+
<name>Neftali Yagua</name>
34+
<email>[email protected]</email>
35+
<organization>Coderic</organization>
36+
<organizationUrl>https://coderic.org</organizationUrl>
37+
<roles>
38+
<role>PMC Chair</role>
39+
</roles>
40+
<timezone>America/Caracas</timezone>
41+
</developer>
2242
</developers>
2343
<scm>
24-
<connection/>
25-
<developerConnection/>
26-
<tag/>
27-
<url/>
44+
<connection>scm:git:https://github.com/Coderic/org.coderic.hub.core.git</connection>
45+
<developerConnection>scm:git:[email protected]:Coderic/org.coderic.hub.core.git</developerConnection>
46+
<url>http://github.com/Coderic/org.coderic.hub.core/tree/master</url>
2847
</scm>
48+
<ciManagement>
49+
<system>GitHub Actions</system>
50+
<url>https://github.com/Coderic/org.coderic.hub.core/actions</url>
51+
</ciManagement>
52+
<issueManagement>
53+
<system>GitHub</system>
54+
<url>https://github.com/Coderic/org.coderic.hub.core/issues</url>
55+
</issueManagement>
2956
<properties>
3057
<java.version>21</java.version>
3158
<spring-ai.version>1.0.0-M4</spring-ai.version>
3259
<spring-cloud.version>2024.0.0</spring-cloud.version>
3360
</properties>
3461
<dependencies>
35-
3662
<dependency>
3763
<groupId>com.okta.spring</groupId>
3864
<artifactId>okta-spring-boot-starter</artifactId>
@@ -55,16 +81,6 @@
5581
<artifactId>thymeleaf-extras-springsecurity6</artifactId>
5682
<version>3.1.3.RELEASE</version>
5783
</dependency>
58-
<dependency>
59-
<groupId>com.google.code.simple-spring-memcached</groupId>
60-
<artifactId>xmemcached-provider</artifactId>
61-
<version>4.0.0</version>
62-
</dependency>
63-
<dependency>
64-
<groupId>com.googlecode.xmemcached</groupId>
65-
<artifactId>xmemcached</artifactId>
66-
<version>2.4.3</version>
67-
</dependency>
6884
<dependency>
6985
<groupId>javax.xml.bind</groupId>
7086
<artifactId>jaxb-api</artifactId>
@@ -106,7 +122,6 @@
106122
<groupId>org.springframework.session</groupId>
107123
<artifactId>spring-session-core</artifactId>
108124
</dependency>
109-
110125
<dependency>
111126
<groupId>com.mysql</groupId>
112127
<artifactId>mysql-connector-j</artifactId>
@@ -146,31 +161,57 @@
146161
</dependency>
147162
</dependencies>
148163
</dependencyManagement>
149-
150164
<build>
165+
<finalName>ROOT##${project.version}</finalName>
151166
<plugins>
152167
<plugin>
153168
<groupId>org.apache.maven.plugins</groupId>
154169
<artifactId>maven-compiler-plugin</artifactId>
155170
<configuration>
156-
<annotationProcessorPaths>
157-
<path>
158-
<groupId>org.projectlombok</groupId>
159-
<artifactId>lombok</artifactId>
160-
</path>
161-
</annotationProcessorPaths>
171+
<source>21</source>
172+
<target>21</target>
162173
</configuration>
163174
</plugin>
164175
<plugin>
165176
<groupId>org.springframework.boot</groupId>
166177
<artifactId>spring-boot-maven-plugin</artifactId>
178+
</plugin>
179+
<plugin>
180+
<artifactId>maven-site-plugin</artifactId>
181+
<version>3.21.0</version>
182+
</plugin><plugin>
183+
<groupId>org.apache.maven.plugins</groupId>
184+
<artifactId>maven-project-info-reports-plugin</artifactId>
185+
<version>3.8.0</version>
186+
</plugin>
187+
<plugin>
188+
<groupId>org.apache.maven.plugins</groupId>
189+
<artifactId>maven-surefire-plugin</artifactId>
190+
<version>3.5.2</version>
191+
<configuration>
192+
<testFailureIgnore>true</testFailureIgnore>
193+
</configuration>
194+
</plugin>
195+
<plugin>
196+
<groupId>org.apache.maven.plugins</groupId>
197+
<artifactId>maven-changes-plugin</artifactId>
198+
<version>2.12.1</version>
199+
<configuration>
200+
<includeOpenIssues>true</includeOpenIssues>
201+
</configuration>
202+
</plugin>
203+
<plugin>
204+
<groupId>org.apache.tomcat.maven</groupId>
205+
<artifactId>tomcat7-maven-plugin</artifactId>
206+
<version>2.2</version>
167207
<configuration>
168-
<excludes>
169-
<exclude>
170-
<groupId>org.projectlombok</groupId>
171-
<artifactId>lombok</artifactId>
172-
</exclude>
173-
</excludes>
208+
<server>TomcatServer</server>
209+
<url>http://localhost:8080/manager/text</url>
210+
<update>true</update>
211+
<path>/${project.build.finalName}</path>
212+
<ignorePackaging>true</ignorePackaging>
213+
<tag>${project.version}</tag>
214+
<mode>war</mode>
174215
</configuration>
175216
</plugin>
176217
</plugins>

src/main/java/org/coderic/hub/core/config/MemCachierConfig.java

-53
This file was deleted.

src/main/resources/application.properties

-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
server.port=${PORT}
2-
server.http.port=${PORT}
31
server.http2.enabled=true
42
spring.security.oauth2.resourceserver.jwt.issuer-uri=https://auth.coderic.org/
53
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://auth.coderic.org/.well-known/jwks.json
@@ -19,15 +17,6 @@ bucket4j.filters[0].rate-limits[0].bandwidths[0].capacity=5
1917
bucket4j.filters[0].rate-limits[0].bandwidths[0].time=10
2018
bucket4j.filters[0].rate-limits[0].bandwidths[0].unit=seconds
2119

22-
memcached.operation-timeout=5000
23-
memcached.default-expiration=3600
24-
memcached.hash-algorithm=ketama
25-
memcached.protocol=BINARY
26-
memcached.cache-enabled=true
27-
memcached.servers=${MEMCACHIER_SERVERS}
28-
memcached.username=${MEMCACHIER_USERNAME}
29-
memcached.password=${MEMCACHIER_PASSWORD}
30-
3120
security.require-ssl=true
3221
okta.oauth2.issuer=https://auth.coderic.org/
3322
okta.oauth2.audience=https://coderic.eu.auth0.com/api/v2/

0 commit comments

Comments
 (0)