Extract artifactory-init.gradle
* Modify GHA workflows to copy `artifactory-init.gradle` as Gradle init script * Use fully-qualified names for reusable workflows making workflow callers as generic
This commit is contained in:
17
.github/artifactory-init.gradle
vendored
Normal file
17
.github/artifactory-init.gradle
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
artifactory {
|
||||
publish {
|
||||
defaults {
|
||||
def zipArtifactProps =
|
||||
['zip.name': 'spring-integration-aws',
|
||||
'zip.displayname': 'Spring Integration Aws',
|
||||
'zip.deployed': 'false']
|
||||
properties {
|
||||
mavenJava zipArtifactProps, '*:*:*:*@zip'
|
||||
mavenJava 'zip.type': 'docs', '*:*:*:docs@zip'
|
||||
mavenJava 'zip.type': 'dist', '*:*:*:dist@zip'
|
||||
}
|
||||
|
||||
publications('mavenJava')
|
||||
}
|
||||
}
|
||||
}
|
||||
2
.github/workflows/ci-snapshot.yml
vendored
2
.github/workflows/ci-snapshot.yml
vendored
@@ -8,5 +8,5 @@ on:
|
||||
|
||||
jobs:
|
||||
build_snapshot:
|
||||
uses: ./.github/workflows/spring-artifactory-gradle-snapshot.yml
|
||||
uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-gradle-snapshot.yml@main
|
||||
secrets: inherit
|
||||
2
.github/workflows/pr-build.yml
vendored
2
.github/workflows/pr-build.yml
vendored
@@ -7,4 +7,4 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/spring-gradle-pull-request-build.yml
|
||||
uses: spring-projects/spring-integration-aws/.github/workflows/spring-gradle-pull-request-build.yml@main
|
||||
|
||||
2
.github/workflows/promote-ga-to-central.yml
vendored
2
.github/workflows/promote-ga-to-central.yml
vendored
@@ -12,7 +12,7 @@ on:
|
||||
|
||||
jobs:
|
||||
release_to_central:
|
||||
uses: ./.github/workflows/spring-artifactory-promote-central.yml
|
||||
uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-promote-central.yml@main
|
||||
with:
|
||||
buildName: ${{ inputs.buildName }}
|
||||
buildNumber: ${{ inputs.buildNumber }}
|
||||
|
||||
2
.github/workflows/promote-milestone.yml
vendored
2
.github/workflows/promote-milestone.yml
vendored
@@ -12,7 +12,7 @@ on:
|
||||
|
||||
jobs:
|
||||
promote_milestone:
|
||||
uses: ./.github/workflows/spring-artifactory-promote-milestone.yml
|
||||
uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-promote-milestone.yml@main
|
||||
with:
|
||||
buildName: ${{ inputs.buildName }}
|
||||
buildNumber: ${{ inputs.buildNumber }}
|
||||
|
||||
2
.github/workflows/release-staging.yml
vendored
2
.github/workflows/release-staging.yml
vendored
@@ -11,7 +11,7 @@ run-name: Release version ${{ inputs.releaseVersion }}
|
||||
|
||||
jobs:
|
||||
staging:
|
||||
uses: ./.github/workflows/spring-artifactory-gradle-release-staging.yml
|
||||
uses: spring-projects/spring-integration-aws/.github/workflows/spring-artifactory-gradle-release-staging.yml@main
|
||||
with:
|
||||
releaseVersion: ${{ inputs.releaseVersion }}
|
||||
secrets: inherit
|
||||
@@ -23,13 +23,21 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Gradle
|
||||
uses: spring-io/spring-gradle-build-action@v2
|
||||
|
||||
- name: Checkout Common Repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: spring-projects/spring-integration-aws
|
||||
|
||||
- name: Copy the artifactory-init.gradle
|
||||
run: cp .github/artifactory-init.gradle $GRADLE_USER_HOME/init.d
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
||||
|
||||
- name: Set up Gradle
|
||||
uses: spring-io/spring-gradle-build-action@v2
|
||||
|
||||
- uses: jfrog/setup-jfrog-cli@v3
|
||||
with:
|
||||
version: 2.50.4
|
||||
|
||||
@@ -20,11 +20,19 @@ jobs:
|
||||
name: CI Build SNAPSHOT for ${{ github.ref_name }}
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Gradle
|
||||
uses: spring-io/spring-gradle-build-action@v2
|
||||
|
||||
- name: Checkout Common Repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: spring-projects/spring-integration-aws
|
||||
|
||||
- name: Copy the artifactory-init.gradle
|
||||
run: cp .github/artifactory-init.gradle $GRADLE_USER_HOME/init.d
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: jfrog/setup-jfrog-cli@v3
|
||||
with:
|
||||
version: 2.50.4
|
||||
|
||||
@@ -52,26 +52,4 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isCI) {
|
||||
artifactory {
|
||||
publish {
|
||||
defaults {
|
||||
def zipArtifactProps =
|
||||
['zip.name': 'spring-integration-aws',
|
||||
'zip.displayname': 'Spring Integration Aws',
|
||||
'zip.deployed': 'false']
|
||||
properties {
|
||||
mavenJava zipArtifactProps, '*:*:*:*@zip'
|
||||
mavenJava 'zip.type': 'docs', '*:*:*:docs@zip'
|
||||
mavenJava 'zip.type': 'dist', '*:*:*:dist@zip'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named('artifactoryPublish') {
|
||||
publications(publishing.publications.mavenJava)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user