Skip to content

Commit

Permalink
Add artifactory plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
fmbenhassine committed Dec 1, 2023
1 parent 6b90372 commit ad5d368
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 16 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/continuous-integration-43x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,16 @@ jobs:
with:
ref: '4.3.x'

- name: Set up Gradle
uses: spring-io/spring-gradle-build-action@6efab5a8a19abb6f42ee20e9d6207859bf2fca02 # v2.0.1
- name: Set up JDK 8
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
java-version: '8'
distribution: 'adopt'

- name: Setup JFrog Cli
uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
- name: Build the project and deploy to Artifactory
env:
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}

- name: Configure JFrog Cli
run: |
jf gradlec \
--use-wrapper \
--repo-deploy libs-snapshot-local
echo JFROG_CLI_BUILD_NAME=${{ github.event.repository.name }}-${{ github.ref_name }} >> $GITHUB_ENV
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
- name: Build the project
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: |
jf gradle clean build -x asciidoc -x asciidoctorPdf -x dist -Palltests --parallel --stacktrace --info
./gradlew clean build --parallel --stacktrace --info
./gradlew artifactoryPublish
22 changes: 22 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,26 @@ plugins {
id 'org.asciidoctor.jvm.pdf' version '3.1.0'
id 'org.asciidoctor.jvm.gems' version '3.1.0'
id 'org.asciidoctor.jvm.convert' version '3.1.0'
id 'com.jfrog.artifactory' version '5.1.11'
}

artifactory {
publish {
contextUrl = 'https://repo.spring.io'
repository {
repoKey = 'libs-snapshot-local'
username = "${System.env.ARTIFACTORY_USERNAME}"
password = "${System.env.ARTIFACTORY_PASSWORD}"
}

defaults {
publications('ALL_PUBLICATIONS')
}
}
}

artifactoryPublish.skip = true

ext {
linkHomepage = 'https://projects.spring.io/spring-batch/'
linkCi = 'https://build.spring.io/browse/BATCH'
Expand Down Expand Up @@ -410,11 +428,13 @@ project('spring-batch-infrastructure') {
project('spring-batch-docs') {
description = 'Spring Batch Docs'
project.tasks.findByPath("artifactoryPublish")?.enabled = false
artifactoryPublish.skip = true
}

project('spring-batch-core-tests') {
description = 'Spring Batch Core Tests'
project.tasks.findByPath("artifactoryPublish")?.enabled = false
artifactoryPublish.skip = true
dependencies {
compile project(":spring-batch-core")
compile project(":spring-batch-infrastructure")
Expand Down Expand Up @@ -454,6 +474,7 @@ project('spring-batch-core-tests') {
project('spring-batch-infrastructure-tests') {
description = 'Spring Batch Infrastructure Tests'
project.tasks.findByPath("artifactoryPublish")?.enabled = false
artifactoryPublish.skip = true
dependencies {
compile project(":spring-batch-infrastructure")
compile "javax.jms:javax.jms-api:$jmsVersion"
Expand Down Expand Up @@ -584,6 +605,7 @@ project('spring-batch-integration') {
project('spring-batch-samples') {
description = 'Batch Batch Samples'
project.tasks.findByPath("artifactoryPublish")?.enabled = false
artifactoryPublish.skip = true

dependencies {

Expand Down

0 comments on commit ad5d368

Please sign in to comment.