@@ -392,22 +392,12 @@ jobs:
392392 name : grails-core-artifacts.txt
393393 path : build/grails-core-artifacts.txt
394394 - name : " 🔨 Create Grails Wrapper Distribution Zip"
395- run : >
396- ./gradlew :grails-wrapper:distZip
397- - name : " ✅ Verify grails-wrapper"
398- if : success()
399- env :
400- GRAILS_WRAPPER_ALLOWED_TYPES : ' SNAPSHOT'
401395 run : |
402- # Pin the wrapper to this branch's snapshot so it doesn't resolve the
403- # globally latest SNAPSHOT in the Apache repo, which may be compiled
404- # for a newer Java runtime than this job's JDK.
405- export PREFERRED_GRAILS_VERSION=$(grep '^projectVersion=' gradle.properties | cut -d'=' -f2)
396+ ./gradlew :grails-wrapper:distZip
406397 cp grails-wrapper/build/distributions/apache-grails-wrapper-*.zip build/wrapper.zip
407398 cd build
408399 unzip wrapper -d tmp
409400 mv tmp/apache-grails-wrapper-* tmp/wrapper
410- ./tmp/wrapper/grailsw --version
411401 - name : " 📤 Upload Wrapper Zip to Workflow Summary Page"
412402 uses : actions/upload-artifact@v7.0.1
413403 with :
@@ -454,6 +444,37 @@ jobs:
454444 with :
455445 name : grails-forge-artifacts.txt
456446 path : grails-forge/build/grails-forge-artifacts.txt
447+ verifyWrapper :
448+ name : " Verify grails-wrapper"
449+ # Verifies the wrapper works end-to-end. Must run after publishForge so that
450+ # grails-cli (which the wrapper resolves at runtime) is available in Nexus.
451+ if : github.repository_owner == 'apache' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
452+ needs : [ publish, publishForge ]
453+ runs-on : ubuntu-24.04
454+ steps :
455+ - name : " Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it
456+ run : curl -s https://api.ipify.org
457+ - name : " 📥 Checkout repository"
458+ uses : actions/checkout@v6
459+ - name : " ☕️ Setup JDK"
460+ uses : actions/setup-java@v4
461+ with :
462+ distribution : liberica
463+ java-version : 17
464+ - name : " 📥 Download Wrapper"
465+ uses : actions/download-artifact@v7.0.0
466+ with :
467+ name : apache-grails-wrapper-SNAPSHOT-bin
468+ path : wrapper
469+ - name : " ✅ Verify grails-wrapper"
470+ env :
471+ GRAILS_WRAPPER_ALLOWED_TYPES : ' SNAPSHOT'
472+ run : |
473+ # Pin the wrapper to this branch's snapshot so it doesn't resolve the
474+ # globally latest SNAPSHOT in the Apache repo, which may be compiled
475+ # for a newer Java runtime than this job's JDK.
476+ export PREFERRED_GRAILS_VERSION=$(grep '^projectVersion=' gradle.properties | cut -d'=' -f2)
477+ ./wrapper/grailsw --version
457478 docs :
458479 if : github.repository_owner == 'apache' && github.event_name == 'push'
459480 needs : [ publish ]
0 commit comments