Skip to content

Commit

Permalink
[CI] Update jfrog cli to v3 (#2018)
Browse files Browse the repository at this point in the history
* [CI] Update jfrog cli to v3

Update setup-jfrog-cli to use `JF_ENV_SPRING` instead of `JF_ARTIFACTORY_SPRING`
Added `JF_URL`
Added reference to `${{ vars.JF_SERVER_ID }}` in place of `repo.spring.io`
Remove maven setup and add --use-wrapper
  • Loading branch information
corneil authored Nov 20, 2024
1 parent 5a066b0 commit 99203f7
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 63 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/build-snapshot-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: jvalkeal/setup-maven@v1
with:
maven-version: 3.6.3
- uses: jfrog/setup-jfrog-cli@v1
with:
version: 1.46.4
- uses: jfrog/setup-jfrog-cli@v3
env:
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
JF_URL: 'https://repo.spring.io'
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}

# cache maven .m2
- uses: actions/cache@v2
Expand All @@ -37,9 +33,9 @@ jobs:
# target deploy repos
- name: Configure JFrog Cli
run: |
jfrog rt mvnc \
--server-id-resolve=repo.spring.io \
--server-id-deploy=repo.spring.io \
jfrog mvnc --use-wrapper \
--server-id-resolve=${{ vars.JF_SERVER_ID }} \
--server-id-deploy=${{ vars.JF_SERVER_ID }} \
--repo-resolve-releases=libs-milestone \
--repo-resolve-snapshots=libs-snapshot \
--repo-deploy-releases=libs-release-local \
Expand All @@ -56,7 +52,7 @@ jobs:
# build and publish to configured target
- name: Build and Publish
run: |
jfrog rt mvn -U -B clean install
jfrog mvn -U -B clean install
jfrog rt build-publish
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildname=spring-cloud-dataflow-ui-3-4-x >> $GITHUB_ENV
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ jobs:
with:
java-version: 1.8
# maven version
- uses: jvalkeal/setup-maven@v1
with:
maven-version: 3.6.2
# build
- name: Build
run: |
mvn -U -B clean package
./mvnw -U -B clean package
# clean m2 cache
- name: Clean cache
run: |
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,17 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 1.8
# maven version
- uses: jvalkeal/setup-maven@v1
with:
maven-version: 3.6.2
# jfrog cli
- uses: jfrog/setup-jfrog-cli@v1
with:
version: 1.46.4
- uses: jfrog/setup-jfrog-cli@v3
env:
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
JF_URL: 'https://repo.spring.io'
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
# setup frog cli
- name: Configure JFrog Cli
run: |
jfrog rt mvnc \
--server-id-resolve=repo.spring.io \
--server-id-deploy=repo.spring.io \
jfrog mvnc --use-wrapper \
--server-id-resolve=${{ vars.JF_SERVER_ID }} \
--server-id-deploy=${{ vars.JF_SERVER_ID }} \
--repo-resolve-releases=libs-milestone \
--repo-resolve-snapshots=libs-snapshot \
--repo-deploy-releases=libs-release-local \
Expand All @@ -48,7 +43,7 @@ jobs:
# build and publish
- name: Build and Publish
run: |
jfrog rt mvn -U -B clean install
jfrog mvn -U -B clean install
jfrog rt build-publish
# clean m2 cache
- name: Clean cache
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/milestone-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: jvalkeal/setup-maven@v1
with:
maven-version: 3.6.3
- uses: jfrog/setup-jfrog-cli@v1
with:
version: 1.46.4
- uses: jfrog/setup-jfrog-cli@v3
env:
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
JF_URL: 'https://repo.spring.io'
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
- uses: actions/cache@v2
with:
path: ~/.m2/repository
Expand All @@ -34,9 +30,9 @@ jobs:
# target deploy repos
- name: Configure JFrog Cli
run: |
jfrog rt mvnc \
--server-id-resolve=repo.spring.io \
--server-id-deploy=repo.spring.io \
jfrog mvnc --use-wrapper \
--server-id-resolve=${{ vars.JF_SERVER_ID }} \
--server-id-deploy=${{ vars.JF_SERVER_ID }} \
--repo-resolve-releases=libs-milestone \
--repo-resolve-snapshots=libs-snapshot \
--repo-deploy-releases=libs-milestone-local \
Expand All @@ -55,7 +51,7 @@ jobs:
# build and publish to configured target
- name: Build and Publish
run: |
jfrog rt mvn build-helper:parse-version versions:set \
jfrog mvn build-helper:parse-version versions:set \
-gs .github/settings.xml \
-Pstagingmilestone \
-DprocessAllModules=true \
Expand All @@ -65,7 +61,7 @@ jobs:
-B
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV
jfrog rt build-clean
jfrog rt mvn clean install \
jfrog mvn clean install \
-gs .github/settings.xml \
-P-spring,stagingmilestone \
-DskipTests -U -B
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/next-dev-version-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: jvalkeal/setup-maven@v1
with:
maven-version: 3.6.3
- uses: jfrog/setup-jfrog-cli@v1
with:
version: 1.46.4
- uses: jfrog/setup-jfrog-cli@v3
env:
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
JF_URL: 'https://repo.spring.io'
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}

# cache maven .m2
- uses: actions/cache@v2
Expand All @@ -36,9 +32,9 @@ jobs:
# target deploy repos
- name: Configure JFrog Cli
run: |
jfrog rt mvnc \
--server-id-resolve=repo.spring.io \
--server-id-deploy=repo.spring.io \
jfrog mvnc --use-wrapper \
--server-id-resolve=${{ vars.JF_SERVER_ID }} \
--server-id-deploy=${{ vars.JF_SERVER_ID }} \
--repo-resolve-releases=libs-milestone \
--repo-resolve-snapshots=libs-snapshot \
--repo-deploy-releases=libs-release-local \
Expand All @@ -55,15 +51,15 @@ jobs:
# build and publish to configured target
- name: Build and Publish
run: |
jfrog rt mvn build-helper:parse-version versions:set \
jfrog mvn build-helper:parse-version versions:set \
-DprocessAllModules=true \
-DgenerateBackupPoms=false \
-Dartifactory.publish.artifacts=false \
-DnewVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}-SNAPSHOT' \
-B
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV
jfrog rt build-clean
jfrog rt mvn clean install -DskipTests -B
jfrog mvn clean install -DskipTests -B
jfrog rt build-publish
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildname=spring-cloud-dataflow-ui-3-4-x-ndv >> $GITHUB_ENV
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildnumber=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/release-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: jvalkeal/setup-maven@v1
with:
maven-version: 3.6.3
- uses: jfrog/setup-jfrog-cli@v1
with:
version: 1.46.4
- uses: jfrog/setup-jfrog-cli@v3
env:
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
JF_URL: 'https://repo.spring.io'
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
- uses: actions/cache@v2
with:
path: ~/.m2/repository
Expand All @@ -34,9 +30,9 @@ jobs:
# target deploy repos
- name: Configure JFrog Cli
run: |
jfrog rt mvnc \
--server-id-resolve=repo.spring.io \
--server-id-deploy=repo.spring.io \
jfrog mvnc --use-wrapper \
--server-id-resolve=${{ vars.JF_SERVER_ID }} \
--server-id-deploy=${{ vars.JF_SERVER_ID }} \
--repo-resolve-releases=libs-release-staging \
--repo-resolve-snapshots=libs-snapshot \
--repo-deploy-releases=libs-staging-local \
Expand All @@ -53,7 +49,7 @@ jobs:
# build and publish to configured target
- name: Build and Publish
run: |
jfrog rt mvn build-helper:parse-version versions:set \
jfrog mvn build-helper:parse-version versions:set \
-gs .github/settings.xml \
-Pstagingrelease \
-DprocessAllModules=true \
Expand All @@ -63,7 +59,7 @@ jobs:
-B
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV
jfrog rt build-clean
jfrog rt mvn clean install \
jfrog mvn clean install \
-gs .github/settings.xml \
-P-spring,stagingrelease \
-DskipTests -U -B
Expand Down

0 comments on commit 99203f7

Please sign in to comment.