Skip to content

Commit

Permalink
Fix verify-staged-artifacts against Spring Integration
Browse files Browse the repository at this point in the history
The Maven-based verification against Samples repository
suffers from the limitation on the `jf mvnc` and our `libs-release-staging` virtual repository not able to
get access to Milestones
  • Loading branch information
artembilan committed Jul 15, 2024
1 parent ff38c6e commit 9c660ad
Showing 1 changed file with 30 additions and 27 deletions.
57 changes: 30 additions & 27 deletions .github/workflows/verify-staged-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ on:
required: true
type: string


env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}

jobs:
verify-staged-with-samples:
verify-staged-with-spring-integration:
runs-on: ubuntu-latest

steps:
Expand All @@ -20,36 +28,31 @@ jobs:
ports: '5672:5672 15672:15672 5552:5552'
plugins: rabbitmq_stream,rabbitmq_management

- name: Checkout Samples Repo
- name: Checkout Spring Integration Repo
uses: actions/checkout@v4
with:
repository: spring-projects/spring-amqp-samples
ref: ${{ github.ref_name }}
repository: spring-projects/spring-integration
show-progress: false

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: 'maven'

- uses: jfrog/setup-jfrog-cli@v4
env:
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}

- name: Configure JFrog Cli
run: jf mvnc --repo-resolve-releases=libs-release-staging --repo-resolve-snapshots=snapshot
- name: Set up Gradle
uses: spring-io/spring-gradle-build-action@v2

- name: Verify samples against staged release
- name: Prepare Spring Integration project against Staging
run: |
mvn versions:set -DnewVersion=${{ inputs.releaseVersion }} -DgenerateBackupPoms=false -DprocessAllModules=true -B -ntp
jf mvn verify -B -ntp
- name: Capture Test Results
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results
path: '**/target/surefire-reports/**/*.*'
retention-days: 1
printf "allprojects {
repositories {
maven {
url 'https://repo.spring.io/libs-staging-local'
credentials {
username = '$ARTIFACTORY_USERNAME'
password = '$ARTIFACTORY_PASSWORD'
}
}
}
}" > staging-repo-init.gradle
sed -i "1,/springAmqpVersion.*/s/springAmqpVersion.*/springAmqpVersion='${{ inputs.releaseVersion }}'/" build.gradle
- name: Verify Spring Integration AMQP module against staged release
run: gradle :spring-integration-amqp:check --init-script staging-repo-init.gradle

0 comments on commit 9c660ad

Please sign in to comment.