-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #430 from RADAR-base/release-2.3.0
Release 2.3.0
- Loading branch information
Showing
95 changed files
with
853 additions
and
668 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -20,24 +20,14 @@ jobs: | |
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-java@v1 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: 11 | ||
java-version: 17 | ||
distribution: temurin | ||
|
||
- name: Cache | ||
uses: actions/[email protected] | ||
with: | ||
# Cache gradle directories | ||
path: | | ||
~/.gradle/caches/jars-3 | ||
~/.gradle/caches/modules-2/files-2.1/ | ||
~/.gradle/caches/modules-2/metadata-2.96/ | ||
~/.gradle/native | ||
~/.gradle/wrapper | ||
# Key for restoring and saving the cache | ||
key: ${{ runner.os }}-gradle | ||
- uses: gradle/gradle-build-action@v2 | ||
|
||
# Compile the code | ||
- name: Compile code | ||
|
@@ -70,31 +60,31 @@ jobs: | |
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Add Docker labels and tags | ||
- name: Docker meta | ||
id: docker_meta | ||
uses: crazy-max/ghaction-docker-meta@v2 | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.DOCKER_IMAGE }} | ||
|
||
# Setup docker build environment | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Cache Docker layers | ||
id: cache-buildx | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile', '**/*.gradle.kts', 'gradle.properties', 'src/main/**') }} | ||
|
@@ -111,7 +101,7 @@ jobs: | |
fi | ||
- name: Build docker | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v3 | ||
with: | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: ${{ steps.cache-parameters.outputs.cache-to }} | ||
|
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 |
---|---|---|
|
@@ -13,31 +13,21 @@ jobs: | |
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: 11 | ||
java-version: 17 | ||
distribution: temurin | ||
|
||
- name: Cache | ||
uses: actions/[email protected] | ||
with: | ||
# A list of files, directories, and wildcard patterns to cache and restore | ||
path: | | ||
~/.gradle/caches/jars-3 | ||
~/.gradle/caches/modules-2/files-2.1/ | ||
~/.gradle/caches/modules-2/metadata-2.96/ | ||
~/.gradle/native | ||
~/.gradle/wrapper | ||
# An explicit key for restoring and saving the cache | ||
key: ${{ runner.os }}-gradle | ||
- uses: gradle/gradle-build-action@v2 | ||
|
||
# Compile code | ||
- name: Compile code | ||
run: ./gradlew assemble | ||
|
||
# Upload it to GitHub | ||
- name: Upload to GitHub | ||
uses: AButler/[email protected] | ||
uses: AButler/[email protected].2 | ||
with: | ||
files: 'build/libs/*' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -52,32 +42,32 @@ jobs: | |
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
# Setup docker build environment | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Add Docker labels and tags | ||
- name: Docker meta | ||
id: docker_meta | ||
uses: crazy-max/ghaction-docker-meta@v2 | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.DOCKER_IMAGE }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
- name: Build docker | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v3 | ||
with: | ||
# Allow running the image on the architectures supported by openjdk:17-jre-slim | ||
platforms: linux/amd64,linux/arm64 | ||
|
@@ -93,4 +83,4 @@ jobs: | |
- name: Inspect docker image | ||
run: | | ||
docker pull ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }} | ||
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }} | ||
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }} |
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 |
---|---|---|
@@ -1,40 +1,35 @@ | ||
FROM openjdk:11-jdk-slim AS builder | ||
FROM --platform=$BUILDPLATFORM gradle:8.0-jdk17 AS builder | ||
|
||
RUN mkdir /code | ||
WORKDIR /code | ||
|
||
ENV GRADLE_OPTS -Dorg.gradle.daemon=false | ||
|
||
COPY ./gradle /code/gradle | ||
COPY ./gradlew /code/ | ||
RUN ./gradlew --version | ||
ENV GRADLE_USER_HOME=/code/.gradlecache \ | ||
GRADLE_OPTS='-Djdk.lang.Process.launchMechanism=vfork -Dorg.gradle.daemon=false -Dorg.gradle.vfs.watch=false' | ||
|
||
COPY ./build.gradle ./settings.gradle /code/ | ||
|
||
RUN gradle downloadDependencies copyDependencies | ||
|
||
COPY ./src /code/src | ||
|
||
RUN ./gradlew unpack | ||
RUN gradle unpack | ||
|
||
FROM openjdk:11-jre-slim | ||
FROM eclipse-temurin:17-jre | ||
|
||
LABEL maintainer="Yatharth Ranjan <[email protected]>" | ||
|
||
LABEL description="RADAR-base App server" | ||
|
||
ENV JDK_JAVA_OPTIONS '-Xmx2G -Djava.security.egd=file:/dev/./urandom' | ||
ENV SPRING_PROFILES_ACTIVE prod | ||
ENV JDK_JAVA_OPTIONS='-Xmx2G -Djava.security.egd=file:/dev/./urandom' \ | ||
SPRING_PROFILES_ACTIVE=prod | ||
|
||
VOLUME /tmp | ||
ARG DEPENDENCY=/code/build/dependency | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=builder ${DEPENDENCY}/BOOT-INF/lib /app/lib | ||
COPY --from=builder /code/build/third-party/* /app/lib/ | ||
COPY --from=builder ${DEPENDENCY}/META-INF /app/META-INF | ||
COPY --from=builder ${DEPENDENCY}/BOOT-INF/classes /app | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT [ "java", "-cp", "app:app/lib/*", "org.radarbase.appserver.AppserverApplication"] | ||
ENTRYPOINT [ "java", "-cp", "app:app/lib/*", "org.radarbase.appserver.AppserverApplication"] |
Oops, something went wrong.