addind latest tag to the image

This commit is contained in:
Dan Alima 2023-12-31 15:22:06 +02:00
parent 513da56640
commit f0066a16c6
2 changed files with 4 additions and 3 deletions

View file

@ -26,7 +26,7 @@ The pipeline publishes the Docker image to JFrog Artifactory using JFrog CLI com
2. Run the following command to build and run the Docker image: 2. Run the following command to build and run the Docker image:
```bash ```bash
docker run -p 8080:8080 danvid.jfrog.io/spring-petclinic-docker-local/spring-petclinic:d21a8c454126fe435287cb448a555e9d213c6cbe docker run -p 8080:8080 danvid.jfrog.io/spring-petclinic-docker-local/spring-petclinic
``` ```
3. Access the Spring Pet Clinic application at [http://localhost:8080/](http://localhost:8080/). 3. Access the Spring Pet Clinic application at [http://localhost:8080/](http://localhost:8080/).

View file

@ -2,7 +2,7 @@ name: JFrog - Home Assignment
on: on:
push: push:
branches: [ main ] branches: [ main, jfrog_assignment ]
pull_request: pull_request:
branches: [ main ] branches: [ main ]
@ -10,6 +10,7 @@ jobs:
build: build:
env: env:
IMAGE_NAME: danvid.jfrog.io/spring-petclinic-docker/spring-petclinic:${{ github.sha }} IMAGE_NAME: danvid.jfrog.io/spring-petclinic-docker/spring-petclinic:${{ github.sha }}
IMAGE_NAME_LATEST: danvid.jfrog.io/spring-petclinic-docker/spring-petclinic:latest
SCA_REPORT_FILE: jfrog_sca_report.json SCA_REPORT_FILE: jfrog_sca_report.json
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -37,7 +38,7 @@ jobs:
run: ./mvnw test run: ./mvnw test
- name: Package the project as a runnable Docker image - name: Package the project as a runnable Docker image
run: | run: |
jf docker build -t ${{ env.IMAGE_NAME }} . jf docker build -t ${{ env.IMAGE_NAME }} -t ${{ env.IMAGE_NAME_LATEST }} .
- name: Scan the project with your preferred SCA tool - name: Scan the project with your preferred SCA tool
run: | run: |