From 4e85331f60d3a6b5d5e66d8d811e22b7f2f1a025 Mon Sep 17 00:00:00 2001 From: Jesse Houldsworth Date: Fri, 14 Mar 2025 09:44:44 -0700 Subject: [PATCH] fixing mvn command --- .github/workflows/ci-pipeline.yml | 32 +++++++++++-------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 1e56841b5..b7ea925c9 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -36,26 +36,14 @@ jobs: --password=${{ secrets.ARTIFACTORY_IDENTITY_TOKEN }} \ --interactive=false - - name: Configure Maven to use JFrog Artifactory + - name: Configure JFrog CLI for Maven run: | - mkdir -p ~/.m2 - echo ' - - - jfrog-artifactory - central - https://trialt0zppb.jfrog.io/artifactory/maven-maven-remote/ - true - - - - - jfrog-artifactory - ${{ secrets.ARTIFACTORY_USERNAME }} - ${{ secrets.ARTIFACTORY_IDENTITY_TOKEN }} - - - ' > ~/.m2/settings.xml + jfrog rt mvnc --server-id-resolve=my-artifactory \ + --repo-resolve-releases=maven-maven-remote \ + --repo-resolve-snapshots=maven-maven-remote \ + --server-id-deploy=my-artifactory \ + --repo-deploy-releases=maven-libs-release-local \ + --repo-deploy-snapshots=maven-libs-snapshot-local - name: Compile and Package the Application run: | @@ -63,13 +51,15 @@ jobs: - name: Publish Maven Artifact to JFrog Artifactory run: | - jfrog rt mvn clean install --build-name=spring-petclinic --build-number=${{ github.run_id }} + jfrog rt mvn clean install --config my-artifactory \ + --build-name=spring-petclinic \ + --build-number=${{ github.run_id }} - name: Build Docker Image run: | docker build -t trialt0zppb.jfrog.io/onboarding-docker-local/spring-petclinic:${{ github.run_id }} . - - name: Collect Docker Build Info with JFrog CLI + - name: Push Docker Image to JFrog Artifactory using JFrog CLI run: | jfrog rt docker-push trialt0zppb.jfrog.io/onboarding-docker-local/spring-petclinic:${{ github.run_id }} onboarding-docker-local \ --build-name=spring-petclinic \