Skip to content

Commit

Permalink
Merge pull request #760 from RADAR-base/MorePlatform-updates
Browse files Browse the repository at this point in the history
Release 0.8.3
  • Loading branch information
Bdegraaf1234 authored Mar 22, 2024
2 parents e7201ff + 6a8e23f commit 68369e8
Show file tree
Hide file tree
Showing 174 changed files with 16,424 additions and 11,066 deletions.
19 changes: 13 additions & 6 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 @@ -71,10 +71,17 @@ jobs:
cp src/test/resources/config/keystore.p12 src/main/resources/config/keystore.p12
./gradlew bootRun &>mp.log </dev/null &
yarn run wait-for-managementportal
./gradlew generateOpenApiSpec
yarn e2e
./gradlew --stop
- name: Upload screenshots of failed e2e tests
if: always()
uses: actions/upload-artifact@v3
with:
path: src/test/javascript/e2e/cypress/screenshots
if-no-files-found: ignore
retention-days: 5

- name: Has SNAPSHOT version
id: is-snapshot
if: github.ref == 'refs/heads/dev'
Expand Down Expand Up @@ -140,10 +147,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
14 changes: 11 additions & 3 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 Down Expand Up @@ -59,6 +59,14 @@ jobs:
yarn e2e
./gradlew --stop
- name: Upload screenshots of failed e2e tests
if: always()
uses: actions/upload-artifact@v3
with:
path: src/test/javascript/e2e/cypress/screenshots
if-no-files-found: ignore
retention-days: 5

- name: Generate github pages
run: ./gradlew ghPages
if: startsWith(github.ref, 'refs/tags/')
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
8 changes: 4 additions & 4 deletions .github/workflows/scheduled-snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master
with:
snyk-version: v1.996.0
snyk-version: v1.1032.0

- 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 All @@ -33,7 +33,7 @@ jobs:
run: >
snyk test
--all-projects
--configuration-matching="^compileClasspath$|^runtimeClasspath$"
--configuration-matching="^runtimeClasspath$"
--org=radar-base
--policy-path=.snyk
--json-file-output=snyk.json
Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,22 @@ jobs:
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master
with:
snyk-version: v1.996.0
snyk-version: v1.1032.0

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

/public
/.yarn/cache/
26 changes: 26 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JAVA-ORGECLIPSEJETTY-5958847:
- '*':
reason: Only used in tests
expires: 2025-05-07T10:08:57.000Z
created: 2024-05-08T10:08:57.000Z
SNYK-JAVA-IONETTY-5953332:
- '*':
reason: Only used in load tests
expires: 2025-05-07T10:08:57.000Z
created: 2024-05-08T10:08:57.000Z
SNYK-JAVA-ORGYAML-2806360:
- '*':
reason: Not using YAML for user-facing code
expires: 2024-05-07T10:09:27.027Z
created: 2023-05-08T10:09:27.030Z
SNYK-JAVA-ORGSPRINGFRAMEWORKBOOT-5441321:
- '*':
reason: Not hosting in CloudFoundry
expires: 2024-05-07T10:09:52.346Z
created: 2023-05-08T10:09:52.353Z
patch: {}
severityThreshold: high
874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cacheFolder: ./.yarn/cache

enableImmutableInstalls: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.4.cjs
54 changes: 18 additions & 36 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,25 @@
# 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/
Expand All @@ -47,23 +29,23 @@ RUN ./gradlew downloadDependencies :radar-auth:shadowJar
# 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
7 changes: 5 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"styles": [
"src/main/webapp/content/scss/global.scss"
],
"allowedCommonJsDependencies": [
"qrcode"
],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -85,7 +88,7 @@
"defaultConfiguration": "development",
"options": {
"proxyConfig": "proxy.conf.json",
"port": 9000
"port": 8081
}
},
"test": {
Expand Down Expand Up @@ -146,4 +149,4 @@
"cli": {
"defaultCollection": "@angular-eslint/schematics"
}
}
}
Loading

0 comments on commit 68369e8

Please sign in to comment.