Skip to content

Commit

Permalink
Use Gradle init script for Artifactory in verify-staged-artifacts
Browse files Browse the repository at this point in the history
The JFrog CLI does not resolve artifacts properly: only provided `--repo-resolve` is in use
  • Loading branch information
artembilan committed Feb 16, 2024
1 parent 3b9d0b6 commit 9e9dffc
Showing 1 changed file with 26 additions and 16 deletions.
42 changes: 26 additions & 16 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-spring-integration:
runs-on: ubuntu-latest
Expand All @@ -20,24 +27,27 @@ jobs:
show-progress: false
ref: 6.2.x

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

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

- name: Configure JFrog Cli
run: jf gradlec --repo-resolve libs-release-staging
- 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: |
sed -i "1,/springKafkaVersion.*/s/springKafkaVersion.*/springKafkaVersion='${{ inputs.releaseVersion }}'/" build.gradle
jf gradle :spring-integration-kafka:check
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
- name: Verify Spring Integration Kafka module against staged release
run: gradle :spring-integration-kafka:check --init-script staging-repo-init.gradle

- name: Capture Test Results
if: failure()
Expand Down

0 comments on commit 9e9dffc

Please sign in to comment.