Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
- package-ecosystem: docker
directory: "/jenkins"
schedule:
interval: weekly
Comment on lines +11 to +14

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Jenkins image updates never run

Docker Dependabot finds no supported manifest under /jenkins because the Maven image exists only in a Jenkinsfile. Its weekly runs cannot update that image.

Learn more

Dependabot's docker ecosystem discovers image references in supported Docker manifests, not Jenkins Pipeline agent declarations. The configured directory contains Jenkinsfile and scripts/deliver.sh, so no dependency is available for this update entry.

Example: When maven:3.9.12-eclipse-temurin-17 becomes available, the weekly Docker job scans /jenkins, finds no Dockerfile, and opens no pull request for the pinned 3.9.11 tag.

Recommended fix: Use an update mechanism that supports Jenkinsfiles, or move the image declaration into a supported manifest consumed by the pipeline. Remove this Dependabot entry if neither approach is adopted, so the configuration does not promise ineffective coverage.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build

on:
push:
branches: [master]
pull_request:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: temurin
cache: maven
- run: mvn -B --strict-checksums clean verify
32 changes: 32 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: codeql

on:
push:
branches: [master]
pull_request:
schedule:
- cron: '0 6 * * 1'

permissions:
contents: read

jobs:
analyze:
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: temurin
cache: maven
- uses: github/codeql-action/init@v3
with:
languages: java-kotlin
queries: security-extended
- uses: github/codeql-action/autobuild@v3
- uses: github/codeql-action/analyze@v3
9 changes: 6 additions & 3 deletions jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
pipeline {
agent {
docker {
image 'maven:3.9-eclipse-temurin-17'
args '-v /root/.m2:/root/.m2'
image 'maven:3.9.11-eclipse-temurin-17'
args '-v $HOME/.m2:/root/.m2'
}
}
options {
timeout(time: 30, unit: 'MINUTES')
}
stages {
stage('Build') {
steps {
Expand All @@ -13,7 +16,7 @@ pipeline {
}
stage('Test') {
steps {
sh 'mvn test'
sh 'mvn -B test'
}
post {
always {
Expand Down
16 changes: 9 additions & 7 deletions jenkins/scripts/deliver.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
#!/usr/bin/env bash

set -euo pipefail

echo 'The following Maven command installs your Maven-built Java application'
echo 'into the local Maven repository, which will ultimately be stored in'
echo 'Jenkins''s local Maven repository (and the "maven-repository" Docker data'
echo 'volume).'
set -x
mvn jar:jar install:install help:evaluate -Dexpression=project.name
mvn -B jar:jar install:install help:evaluate -Dexpression=project.name
set +x

echo 'The following complex command extracts the value of the <name/> element'
echo 'The following command reads the value of the <name/> element'
echo 'within <project/> of your Java/Maven project''s "pom.xml" file.'
set -x
NAME=`mvn help:evaluate -Dexpression=project.name | grep "^[^\[]"`
NAME=$(mvn -B -q help:evaluate -Dexpression=project.name -DforceStdout)
set +x

echo 'The following complex command behaves similarly to the previous one but'
echo 'extracts the value of the <version/> element within <project/> instead.'
echo 'The following command behaves similarly to the previous one but'
echo 'reads the value of the <version/> element within <project/> instead.'
set -x
VERSION=`mvn help:evaluate -Dexpression=project.version | grep "^[^\[]"`
VERSION=$(mvn -B -q help:evaluate -Dexpression=project.version -DforceStdout)
set +x

echo 'The following command runs and outputs the execution of your Java'
echo 'application (which Jenkins built using Maven) to the Jenkins UI.'
set -x
java -jar target/${NAME}-${VERSION}.jar
java -jar "target/${NAME}-${VERSION}.jar"
Loading