-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6f2872a
Showing
29 changed files
with
2,820 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.bat text eol=crlf | ||
*.cmd text eol=crlf | ||
mvnw eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: All Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: All Tests | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Build with Maven | ||
run: ./mvnw verify | ||
- name: Check clean git state | ||
run: ./.github/workflows/check-clean-git-state.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
R=`git status --porcelain | wc -l` | ||
if [ "$R" -ne "0" ]; then | ||
echo "The git repository is not clean after compiling and testing. Did you forget to commit or ignore files?"; | ||
git status --porcelain | ||
exit 1; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/target/ | ||
.gradle | ||
build/ | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
.DS_Store | ||
|
||
# The following files are generated/updated by vaadin-maven-plugin or vaadin-gradle-plugin | ||
src/main/dev-bundle | ||
node_modules/ | ||
frontend/generated/ | ||
pnpmfile.js | ||
.npmrc | ||
webpack.generated.js | ||
vite.generated.ts | ||
|
||
# Browser drivers for local integration tests | ||
drivers/ | ||
|
||
# Error screenshots generated by TestBench for failed integration tests | ||
error-screenshots/ | ||
|
||
# Eclipse and STS | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
# IntelliJ IDEA | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
|
||
# NetBeans | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
# VS Code | ||
.vscode/ | ||
|
||
# The following are auto-generated by Vaadin if missing, but they should be added to source control if customized. | ||
tsconfig.json | ||
types.d.ts | ||
index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM gitpod/workspace-full | ||
|
||
RUN sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
RUN sudo apt-get -q update | ||
RUN sudo apt -y install ./google-chrome-stable_current_amd64.deb | ||
RUN sudo apt-get -y install libnss3\ | ||
libnspr4\ | ||
libatk1.0-0\ | ||
libatk-bridge2.0-0\ | ||
libcups2\ | ||
libdrm2\ | ||
libxkbcommon0\ | ||
libxcomposite1\ | ||
libxdamage1\ | ||
libxfixes3\ | ||
libxrandr2\ | ||
libgbm1\ | ||
libgtk-3-0\ | ||
libatspi2.0-0\ | ||
libx11-xcb-dev | ||
RUN sudo rm -rf /var/lib/apt/lists/* | ||
|
||
RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \ | ||
&& sdk update \ | ||
&& sdk install java 21.0.2-tem \ | ||
&& sdk default java 21.0.2-tem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
tasks: | ||
- init: mvn package -Pproduction | ||
|
||
command: mvn | ||
ports: | ||
- port: 8080 | ||
onOpen: open-preview | ||
image: | ||
file: .gitpod.Dockerfile | ||
vscode: | ||
extensions: | ||
- [email protected]:llHUlx8TJ6tFKGa1t6dpLQ== | ||
- [email protected]:gNh98vNbqtZC6ydHasFxAQ== | ||
- [email protected]:1iLvjTfznJrV611qRUeOHg== |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip | ||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Stage that builds the application, a prerequisite for the running stage | ||
FROM maven:3-openjdk-21-slim AS build | ||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - | ||
RUN apt-get update -qq \ | ||
&& apt-get install -y -qq --no-install-recommends nodejs \ | ||
&& apt-get clean | ||
|
||
# Stop running as root at this point | ||
RUN useradd -m myuser | ||
WORKDIR /usr/src/app/ | ||
RUN chown myuser:myuser /usr/src/app/ | ||
USER myuser | ||
|
||
# Copy pom.xml and prefetch dependencies so a repeated build can continue from the next step with existing dependencies | ||
COPY --chown=myuser pom.xml ./ | ||
RUN mvn dependency:go-offline -Pproduction | ||
|
||
# Copy all needed project files to a folder | ||
COPY --chown=myuser:myuser src src | ||
COPY --chown=myuser:myuser frontend frontend | ||
COPY --chown=myuser:myuser package.json ./ | ||
|
||
# Using * after the files that are autogenerated so that so build won't fail if they are not yet created | ||
COPY --chown=myuser:myuser package-lock.json* pnpm-lock.yaml* webpack.config.js* ./ | ||
|
||
|
||
# Build the production package, assuming that we validated the version before so no need for running tests again | ||
RUN mvn clean package -DskipTests -Pproduction | ||
|
||
# Running stage: the part that is used for running the application | ||
FROM openjdk:21-jdk-slim | ||
COPY --from=build /usr/src/app/target/*.jar /usr/app/app.jar | ||
RUN useradd -m myuser | ||
USER myuser | ||
EXPOSE 8080 | ||
CMD java -jar /usr/app/app.jar |
Oops, something went wrong.