Skip to content

Commit

Permalink
Merge pull request #701 from RADAR-base/release-2.0
Browse files Browse the repository at this point in the history
Release 2.0
  • Loading branch information
blootsvoets authored Mar 14, 2023
2 parents e7201ff + abb0495 commit 00b1208
Show file tree
Hide file tree
Showing 542 changed files with 30,330 additions and 17,082 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ node_modules
oauth-client-util/build
oauth-client-util/out
oauth-client-util/src/test
radar-auth/deprecated-auth0/build
src/test/java
src/gatling
.yarn/unplugged
.yarn/install-state.gz
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ insert_final_newline = true

[*.ts]
quote_type = single
continuation_indent_size = 4

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2

[{package,bower}.json]
indent_style = space
indent_size = 2
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Use Node.js 15
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 15
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 17

- name: Cache
uses: actions/cache@v3
Expand Down Expand Up @@ -140,10 +140,10 @@ jobs:
echo "cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max" >> $GITHUB_OUTPUT
fi
- name: Use Node.js 15
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 15
node-version: 16

- name: Prime yarn cache
run: yarn install --mode=skip-build
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Use Node.js 15
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 15
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -31,7 +31,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 17

- name: Cache
uses: actions/cache@v3
Expand All @@ -49,8 +49,7 @@ jobs:
run: |
yarn install
- name: End to end tests
id: e2e
- name: Run full end to end tests
run: |
cp src/test/resources/config/keystore.p12 src/main/resources/config/keystore.p12
./gradlew bootRun &>mp.log </dev/null &
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Use Node.js 15
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 15
node-version: 16

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand All @@ -30,7 +30,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 17

- name: Cache
uses: actions/cache@v3
Expand Down Expand Up @@ -73,10 +73,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Use Node.js 15
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 15
node-version: 16

- name: Prime yarn cache
run: yarn install --check-cache --mode=skip-build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scheduled-snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: '15'
node-version: '16'
cache: npm

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down
20 changes: 4 additions & 16 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,25 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: '15'
node-version: '16'
cache: npm

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Run Snyk to check for vulnerabilities in compileClasspath
- name: Run Snyk to check for vulnerabilities
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: >
snyk test
--all-projects
--configuration-matching="^compileClasspath$"
--configuration-matching="^compileClasspath$|^runtimeClasspath$"
--fail-on=upgradable
--org=radar-base
--policy-path=.snyk
--severity-threshold=high
- name: Run Snyk to check for vulnerabilities in runtimeClasspath
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: >
snyk test
--all-projects
--configuration-matching="^runtimeClasspath$"
--fail-on=upgradable
--org=radar-base
--policy-path=.snyk
--severity-threshold=high
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,12 @@ Desktop.ini
!/libs/**/*.jar

/public

## Yarn 2
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
768 changes: 768 additions & 0 deletions .yarn/releases/yarn-3.1.0.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cacheFolder: "./.yarn/cache"
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.1.0.cjs
enableImmutableInstalls: true
57 changes: 19 additions & 38 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,69 +1,50 @@
# Build stage
FROM --platform=linux/amd64 eclipse-temurin:11-jdk as builder
FROM --platform=$BUILDPLATFORM eclipse-temurin:17-jdk as builder

# Install cURL...
RUN apt-get update && \
apt-get install --no-install-recommends -yq curl && \
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
# ...then install NodeJS
apt-get install --no-install-recommends -yq nodejs build-essential && \
npm install -g npm && \
npm install -g yarn && \
# ...then install everything needed for Headless Chrome to work
apt-get install --no-install-recommends -yq \
ca-certificates fonts-liberation libappindicator3-1 libasound2 \
libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 \
libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 \
libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 \
libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 libxshmfence1 \
lsb-release \
wget xdg-utils && \
# ...and clean up the dependencies
apt autoremove && \
rm -rf /var/lib/apt/lists/*
# Install NodeJS and Yarn
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash \
&& apt-get update && apt-get install -y \
nodejs \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g yarn

# installing the node and java packages before adding the src directory
# will allow us to re-use these image layers when only the souce code changes
WORKDIR /app
## installing the node and java packages before adding the src directory
## will allow us to re-use these image layers when only the souce code changes
WORKDIR /code

ENV GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.project.prod=true"
ENV GRADLE_OPTS="-Dorg.gradle.daemon=false -Dorg.gradle.project.prod=true -Dorg.gradle.vfs.watch=false"

COPY package.json yarn.lock /app/
COPY package.json yarn.lock .yarnrc.yml /code/
COPY .yarn /code/.yarn
RUN yarn install --network-timeout 1000000

COPY gradlew /app/
COPY gradle/wrapper gradle/wrapper
RUN ./gradlew --version

COPY gradle gradle
COPY build.gradle gradle.properties settings.gradle /app/
COPY gradlew build.gradle gradle.properties settings.gradle /code/
COPY radar-auth/build.gradle radar-auth/
COPY radar-auth/deprecated-auth0/build.gradle radar-auth/deprecated-auth0/
COPY oauth-client-util/build.gradle oauth-client-util/

RUN ./gradlew downloadDependencies :radar-auth:shadowJar
RUN ./gradlew downloadDependencies

# now we copy our application source code and build it

COPY angular.json proxy.conf.json tsconfig.app.json \
tsconfig.spec.json tsconfig.json tslint.json /app/
tsconfig.spec.json tsconfig.json tslint.json /code/
COPY webpack webpack

COPY radar-auth radar-auth
COPY src src
RUN ./gradlew -s bootWar

# Run stage
FROM eclipse-temurin:11-jre
FROM eclipse-temurin:17-jre

ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
JHIPSTER_SLEEP=0 \
JAVA_OPTS=""

# Add the war and changelogs files from build stage
COPY --from=builder /app/build/libs/*.war /app.war
COPY --from=builder /app/src/main/docker/etc /mp-includes
COPY --from=builder /code/build/libs/*.war /app.war
COPY --from=builder /code/src/main/docker/etc /mp-includes

EXPOSE 8080 5701/udp
CMD echo "The application will start in ${JHIPSTER_SLEEP}s..." && \
Expand Down
Loading

0 comments on commit 00b1208

Please sign in to comment.