mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
Added jfrog to the build and test
This commit is contained in:
parent
b8a57dcbd7
commit
7937bc6987
1 changed files with 45 additions and 1 deletions
46
.github/workflows/maven-build.yml
vendored
46
.github/workflows/maven-build.yml
vendored
|
@ -25,6 +25,13 @@ jobs:
|
|||
java-version: ${{matrix.java}}
|
||||
distribution: 'adopt'
|
||||
cache: maven
|
||||
|
||||
- name: Setup JFrog CLI
|
||||
uses: jfrog/setup-jfrog-cli@v3
|
||||
env:
|
||||
JF_URL: ${{ secrets.JF_URL }}
|
||||
JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
|
||||
|
||||
- name: Build with Maven Wrapper
|
||||
run: ./mvnw -B package
|
||||
|
||||
|
@ -37,4 +44,41 @@ jobs:
|
|||
# I add this step for debug.
|
||||
# My local Linux laptop uses podman rather than docker, so this is a useful debug step.
|
||||
- name: List all the container images on the runner
|
||||
run: docker image list
|
||||
run: docker image
|
||||
|
||||
|
||||
#######################################
|
||||
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup JFrog CLI
|
||||
uses: jfrog/setup-jfrog-cli@v3
|
||||
env:
|
||||
JF_URL: ${{ secrets.JF_URL }}
|
||||
JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
|
||||
|
||||
- name: Retag image with jfrog repo
|
||||
run: docker tag spring-petclinic:3.1.0-SNAPSHOT my0373.jfrog.io/my0373-docker/spring-petclinic:3.1.0-SNAPSHOT
|
||||
|
||||
- name: Build Tag and push Docker Image
|
||||
env:
|
||||
IMAGE_NAME: my0373.jfrog.io/my0373-docker/spring-petclinic:3.1.0-SNAPSHOT
|
||||
run:
|
||||
jf docker push $IMAGE_NAME
|
||||
|
||||
- name: Publish Build info With JFrog CLI
|
||||
env:
|
||||
# Generated and maintained by GitHub
|
||||
JFROG_CLI_BUILD_NAME: spring-petclinic
|
||||
# JFrog organization secret
|
||||
JFROG_CLI_BUILD_NUMBER : ${{ github.run_number }}
|
||||
run: |
|
||||
# Export the build name and build nuber
|
||||
# Collect environment variables for the build
|
||||
jf rt build-collect-env
|
||||
# Collect VCS details from git and add them to the build
|
||||
jf rt build-add-git
|
||||
# Publish build info
|
||||
jf rt build-publish
|
Loading…
Reference in a new issue