Skip to content

Commit 7e7a811

Browse files
committed
retry with ai
1 parent 4030405 commit 7e7a811

File tree

6 files changed

+47
-12
lines changed

6 files changed

+47
-12
lines changed

.github/workflows/build-preview.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
- name: Extract version from pom.xml
2626
id: extract-version
2727
run: |
28-
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
28+
echo "Extracting version from pom.xml..."
29+
chmod +x ./mvnw
30+
VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
2931
DOCKER_VERSION=${VERSION%-SNAPSHOT}
3032
echo "version=$VERSION" >> $GITHUB_OUTPUT
3133
echo "docker_version=$DOCKER_VERSION" >> $GITHUB_OUTPUT

.github/workflows/pr-preview.yml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

@@ -77,6 +97,11 @@ jobs:
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

.github/workflows/visual-diff.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232
id: extract-pr-version
3333
working-directory: pr-code
3434
run: |
35-
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
35+
echo "Extracting PR version..."
36+
chmod +x ./mvnw
37+
VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
3638
DOCKER_VERSION=${VERSION%-SNAPSHOT}
3739
echo "version=$VERSION" >> $GITHUB_OUTPUT
3840
echo "docker_version=$DOCKER_VERSION" >> $GITHUB_OUTPUT
@@ -58,7 +60,9 @@ jobs:
5860
id: extract-main-version
5961
working-directory: main-code
6062
run: |
61-
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
63+
echo "Extracting main version..."
64+
chmod +x ./mvnw
65+
VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
6266
DOCKER_VERSION=${VERSION%-SNAPSHOT}
6367
echo "version=$VERSION" >> $GITHUB_OUTPUT
6468
echo "docker_version=$DOCKER_VERSION" >> $GITHUB_OUTPUT

scripts/build-with-version-sync.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set -e
55

66
# Extract version from pom.xml
7-
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
7+
VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
88
echo "Detected version from pom.xml: $VERSION"
99

1010
# Remove -SNAPSHOT suffix for Docker tags if present

scripts/sync-versions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -e
66
echo "🔄 Syncing versions across all files..."
77

88
# Extract version from pom.xml
9-
POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
9+
POM_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
1010
BASE_VERSION=${POM_VERSION%-SNAPSHOT}
1111
WEB_VERSION="$BASE_VERSION-no-vault"
1212

scripts/validate-versions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -e
66
echo "🔍 Checking version consistency across files..."
77

88
# Extract version from pom.xml
9-
POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
9+
POM_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
1010
echo "📄 pom.xml version: $POM_VERSION"
1111

1212
# Extract base version (remove -SNAPSHOT)

0 commit comments

Comments
 (0)