Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
63990b6
Merge pull request #462 from RADAR-base/release-2.4.2
Bdegraaf1234 Aug 2, 2024
323ac87
Add license
Bdegraaf1234 Aug 19, 2024
f8739db
Merge pull request #508 from RADAR-base/release-2.4.3
pvannierop Oct 11, 2024
f8d5b5f
Add weekly Snyk Docker image scan to Github actions
pvannierop Feb 12, 2025
680599c
Fix version of actions/upload-artifact
pvannierop Feb 12, 2025
c14469f
Merge pull request #524 from RADAR-base/feature/snyk-docker-image-action
pvannierop Feb 12, 2025
d19c892
Fix docker image scan action
pvannierop Feb 12, 2025
2290804
Merge pull request #525 from RADAR-base/bugfix/docker-image-scan
pvannierop Feb 12, 2025
039c198
Remove --all-projects param from Github action
pvannierop Feb 12, 2025
c77c26e
Fix result filename in action
pvannierop Feb 12, 2025
d91d698
Remove continue-on-error property from action
pvannierop Feb 12, 2025
2a91d2f
Remove continue-on-error property from action
pvannierop Feb 12, 2025
82a9104
Refactor Snyk scan yaml files
pvannierop Feb 14, 2025
fd37227
Merge pull request #526 from RADAR-base/refactor/snyk-actions
pvannierop Feb 14, 2025
35b04da
Add release branches to snyk PR commit trigger
pvannierop Feb 14, 2025
eedde24
Apply security upgrades March 2025 platform upgrade
pvannierop Feb 14, 2025
8d50f08
Merge pull request #527 from RADAR-base/security/march-2025-fixes
pvannierop Feb 14, 2025
843e7a5
Complete security upgrades March 2025 platform upgrade
pvannierop Feb 14, 2025
8694e08
Merge pull request #528 from RADAR-base/security/march-2025-fixes
pvannierop Feb 14, 2025
c17f4c4
Up project version to 2.4.4
pvannierop Feb 17, 2025
acb506e
Fix and update GitHub actions
pvannierop Sep 3, 2025
06c194f
Up gradle version to 8.13
pvannierop Sep 3, 2025
135a2d5
Fix deprecated Spring Security API
pvannierop Sep 3, 2025
560938f
Apply security upgrades October 2025 platform upgrade
pvannierop Sep 3, 2025
5d9ada5
Fix PMD error
pvannierop Sep 3, 2025
ecdc28c
Update formatting
pvannierop Sep 3, 2025
b90baed
Test against latest management portal version
pvannierop Sep 3, 2025
a9b8eac
Fix dependencies to make tests pass
pvannierop Sep 3, 2025
8ecbd47
Attempt to fix 'downstream' integration test
pvannierop Sep 3, 2025
43e18a9
Disable 'downstream' integration test
pvannierop Sep 3, 2025
d969be6
Up project version to 2.4.5
pvannierop Sep 3, 2025
e513df0
Merge pull request #532 from RADAR-base/release-2.4.5
pvannierop Sep 4, 2025
48bf8bf
Fix docker image name
pvannierop Sep 10, 2025
942a328
Merge pull request #533 from RADAR-base/release-2.4.5
pvannierop Sep 10, 2025
3bdc183
Globally disable liquibase analytics
pvannierop Sep 15, 2025
b5d79b4
Merge pull request #534 from RADAR-base/release-2.4.5
pvannierop Sep 15, 2025
8a175ab
Fix docker image scanning action
pvannierop Oct 15, 2025
817090c
Fix docker image scanning action
pvannierop Oct 15, 2025
577a420
Merge branch 'dev' into release-2.4.5
mpgxvii Nov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,21 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v5

- uses: actions/setup-java@v3
- uses: actions/setup-java@v5
if: matrix.language == 'java'
with:
java-version: 17
distribution: temurin

- uses: gradle/gradle-build-action@v2
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
if: matrix.language == 'java'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -63,7 +64,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -77,4 +78,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
232 changes: 137 additions & 95 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,35 @@ on:
branches: [ master, dev ]

env:
DOCKER_IMAGE: radarbase/radar-appserver
REGISTRY: ghcr.io
REPOSITORY: ${{ github.repository }}
IMAGES: >-
[{
'name': 'radar-appserver',
'build_file': 'Dockerfile',
'authors': 'Yatharth Ranjan <[email protected]>, Pauline Conde <[email protected]>',
'description': 'RADAR-base appserver backend application',
'cache_keys_files': ['Dockerfile', '**/*.gradle.kts', 'gradle.properties', 'src/main/**']
}]

jobs:
# Build and test the code
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

# 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@v3
- uses: actions/checkout@v5

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

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

# Compile the code
- name: Compile code
run: ./gradlew assemble

Expand All @@ -51,31 +59,30 @@ jobs:
run: |
gpg --pinentry-mode loopback --local-user "Yatharth Ranjan" --batch --yes --passphrase "${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}" --output src/integrationTest/resources/google-credentials.json --decrypt src/integrationTest/resources/google-credentials.enc.gpg

# Gradle check
- name: Check
- name: Gradle check
run: GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/src/integrationTest/resources/google-credentials.json ./gradlew check

- name: Upload build artifacts
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: build/reports
if-no-files-found: ignore
retention-days: 5

# Build and test the code against the :dev docker image of parent repositories
test-downstream:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# FIXME: the tests against :dev fail and I cannot find out why. Since tests against current
# Management Portal main branch is ok, I disable this integration test.
if: false
# only run this on 'ready for review' PRs or when triggered by an upstream job
if: github.event.pull_request.draft == false || github.event_name == 'workflow_dispatch'
# if: github.event.pull_request.draft == false || github.event_name == 'workflow_dispatch'

# 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@v3
- uses: actions/checkout@v5

- uses: actions/setup-java@v3
- uses: actions/setup-java@v5
with:
java-version: 17
distribution: temurin
Expand Down Expand Up @@ -104,86 +111,121 @@ jobs:
- name: Check
run: GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/src/integrationTest/resources/google-credentials.json ./gradlew check

# Check that the docker image builds correctly
prepare-matrix:
name: Prepare Matrix Output
permissions: {}
runs-on: ubuntu-latest
outputs:
images: ${{ steps.step1.outputs.matrix }}
steps:
- name: Create Matrix Variable
id: step1
run: echo "matrix=${{ env.IMAGES }}" >> $GITHUB_OUTPUT

# Build and push tagged release backend docker image
docker:
# The type of runner that the job will run on
needs: prepare-matrix
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'
strategy:
matrix:
image: ${{ fromJson(needs.prepare-matrix.outputs.images ) }}
permissions:
contents: read
packages: write

# 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@v3

- name: Login to Docker Hub
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: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_IMAGE }}

# Setup docker build environment
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
id: cache-buildx
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile', '**/*.gradle.kts', 'gradle.properties', 'src/main/**') }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Cache parameters
id: cache-parameters
run: |
if [ "${{ steps.cache-buildx.outputs.cache-hit }}" = "true" ]; then
echo "::set-output name=cache-to::"
else
echo "::set-output name=cache-to::type=local,dest=/tmp/.buildx-cache-new,mode=max"
fi

- name: Build docker
uses: docker/build-push-action@v3
with:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: ${{ steps.cache-parameters.outputs.cache-to }}
load: true
tags: ${{ steps.docker_meta.outputs.tags }}
# Use runtime labels from docker_meta as well as fixed labels
labels: |
${{ steps.docker_meta.outputs.labels }}
maintainer=Yatharth Ranjan <[email protected]>, Pauline Conde <[email protected]>
org.opencontainers.image.authors=Yatharth Ranjan <[email protected]>, Pauline Conde <[email protected]>
org.opencontainers.image.vendor=RADAR-base
org.opencontainers.image.licenses=Apache-2.0

- name: Inspect docker image
run: docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}

# Push the image on the dev and master branches
- name: Push image
if: ${{ github.event_name != 'pull_request' }}
run: docker push ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move docker build cache
if: steps.cache-buildx.outputs.cache-hit != 'true'
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

- uses: actions/checkout@v5

- name: Docker build parameters
id: docker_params
run: |
echo "::set-output name=has_docker_login::${{ secrets.DOCKERHUB_USERNAME != '' && secrets.DOCKERHUB_TOKEN != '' }}"
if [ "${{ github.event_name == 'pull_request' }}" = "true" ]; then
echo "::set-output name=push::false"
echo "::set-output name=load::true"
echo "::set-output name=platforms::linux/amd64"
else
echo "::set-output name=push::true"
echo "::set-output name=load::false"
echo "::set-output name=platforms::linux/amd64,linux/arm64"
fi

- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ matrix.image.name }}-${{ hashFiles(matrix.image.cache_key_files) }}
restore-keys: |
${{ runner.os }}-buildx-${{ matrix.image.name }}-

- name: Cache parameters
id: cache-parameters
run: |
if [ "${{ steps.cache_buildx.outputs.cache-hit }}" = "true" ]; then
echo "::set-output name=cache-to::"
else
echo "::set-output name=cache-to::type=local,dest=/tmp/.buildx-cache-new,mode=max"
fi

- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Lowercase image name
run: |
echo "DOCKER_IMAGE=${REGISTRY}/${REPOSITORY,,}/${{ matrix.image.name }}" >>${GITHUB_ENV}

# Add Docker labels and tags
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_IMAGE }}

# Setup docker build environment
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build backend docker and optionally push
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.image.build_file }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: ${{ steps.cache-parameters.outputs.cache-to }}
platforms: ${{ steps.docker_params.outputs.platforms }}
load: ${{ steps.docker_params.outputs.load }}
push: ${{ steps.docker_params.outputs.push }}
tags: ${{ steps.docker_meta.outputs.tags }}
# Use runtime labels from docker_meta as well as fixed labels
labels: |
${{ steps.docker_meta.outputs.labels }}
maintainer=${{ matrix.image.authors }}
org.opencontainers.image.description=${{ matrix.image.description }}
org.opencontainers.image.authors=${{ matrix.image.authors }}
org.opencontainers.image.vendor=RADAR-base
org.opencontainers.image.licenses=Apache-2.0

# Push the backend image on the dev and master branches
- name: Pull images
if: steps.docker_params.outputs.load == 'false'
run: docker pull ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}

- name: Inspect docker images
run: |
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }}

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move docker build cache
if: steps.cache_buildx.outputs.cache-hit != 'true'
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
Loading
Loading