Skip to content

Commit

Permalink
Fix verify-staged for Artifactory
Browse files Browse the repository at this point in the history
The JFrog CLI does not add `--repo-resolve` to Gradle build
(unlike for Maven)

* Get rid of JFrog CLI
* Generate Gradle init script manually for our `libs-staging-local`
and use respective secrets for credentials

See more info in: jfrog/jfrog-cli#2364
  • Loading branch information
artembilan committed Dec 15, 2023
1 parent ac4aa7c commit eb68d6d
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/verify-staged-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ 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:
runs-on: ubuntu-latest
Expand All @@ -19,31 +26,24 @@ jobs:
repository: spring-projects/spring-integration
show-progress: false

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

- uses: jfrog/setup-jfrog-cli@v3
with:
version: 2.52.2
env:
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}

- name: Configure JFrog Cli
run: jf gradlec --repo-resolve libs-staging-local
- name: Set up Gradle
uses: spring-io/spring-gradle-build-action@v2

- name: Verify Spring Integration Kafka against staged release
- name: Prepare Spring Integration project against Staging
run: |
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,/springKafkaVersion.*/s/springKafkaVersion.*/springKafkaVersion='${{ inputs.releaseVersion }}'/" build.gradle
jf gradle :spring-integration-kafka:check
- name: Capture Test Results
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-results
path: '**/target/surefire-reports/**/*.*'
retention-days: 1
- name: Verify Spring Integration Samples against staged release
run: gradle :spring-integration-kafka:check --init-script staging-repo-init.gradle

0 comments on commit eb68d6d

Please sign in to comment.