@@ -32,19 +32,39 @@ jobs:
3232 distribution : " oracle"
3333 cache : " maven"
3434
35- - name : Build application
36- run : ./mvnw --no-transfer-progress clean package -DskipTests
37-
3835 - name : Extract version from pom.xml
3936 id : extract-version
4037 run : |
41- VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
38+ echo "Extracting version from pom.xml..."
39+ chmod +x ./mvnw
40+ VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
4241 DOCKER_VERSION=${VERSION%-SNAPSHOT}
4342 echo "version=$VERSION" >> $GITHUB_OUTPUT
4443 echo "docker_version=$DOCKER_VERSION" >> $GITHUB_OUTPUT
4544 echo "Detected version: $VERSION"
4645 echo "Docker version: $DOCKER_VERSION"
4746
47+ - name : Build application
48+ run : ./mvnw --no-transfer-progress clean package -DskipTests
49+
50+ - name : Verify JAR file was created
51+ run : |
52+ echo "Checking target directory..."
53+ ls -la target/
54+ echo "Looking for JAR files..."
55+ find target/ -name "*.jar" -type f
56+ echo "Verifying specific JAR exists..."
57+ JAR_FILE="target/wrongsecrets-${{ steps.extract-version.outputs.version }}.jar"
58+ if [ -f "$JAR_FILE" ]; then
59+ echo "✅ JAR file found: $JAR_FILE"
60+ ls -la "$JAR_FILE"
61+ else
62+ echo "❌ Expected JAR file not found: $JAR_FILE"
63+ echo "Available JAR files:"
64+ find target/ -name "*.jar" -type f || echo "No JAR files found"
65+ exit 1
66+ fi
67+
4868 - name : Set up Docker Buildx
4969 uses : docker/setup-buildx-action@v3
5070
7797 cache-from : type=gha
7898 cache-to : type=gha,mode=max
7999
100+ - name : Verify Docker image was built
101+ run : |
102+ echo "Verifying Docker image was built successfully..."
103+ docker images | grep wrongsecrets-pr || echo "No wrongsecrets-pr images found"
104+
80105 # Comment out Render deployment for now
81106 # - name: Deploy to Render (Preview)
82107 # env:
@@ -165,7 +190,9 @@ jobs:
165190 id : extract-pr-version
166191 working-directory : pr-code
167192 run : |
168- VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
193+ echo "Extracting PR version from pom.xml..."
194+ chmod +x ./mvnw
195+ VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
169196 DOCKER_VERSION=${VERSION%-SNAPSHOT}
170197 echo "version=$VERSION" >> $GITHUB_OUTPUT
171198 echo "docker_version=$DOCKER_VERSION" >> $GITHUB_OUTPUT
@@ -192,7 +219,9 @@ jobs:
192219 id : extract-main-version
193220 working-directory : main-code
194221 run : |
195- VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
222+ echo "Extracting main version from pom.xml..."
223+ chmod +x ./mvnw
224+ VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
196225 DOCKER_VERSION=${VERSION%-SNAPSHOT}
197226 echo "version=$VERSION" >> $GITHUB_OUTPUT
198227 echo "docker_version=$DOCKER_VERSION" >> $GITHUB_OUTPUT
0 commit comments