mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 06:45:50 +00:00
add use of Variables
This commit is contained in:
parent
b0655d35ab
commit
b037d0f2ae
2 changed files with 14 additions and 6 deletions
10
.github/workflows/maven-build.yml
vendored
10
.github/workflows/maven-build.yml
vendored
|
@ -5,9 +5,9 @@ name: Java CI with Maven
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, Features ]
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main, Features ]
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -113,8 +113,8 @@ jobs:
|
|||
- name: Login to Jfrog Artifactory
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: rodi26.jfrog.io
|
||||
username: 'rodolphe.fontaine@orange.fr'
|
||||
registry: ${{ secrets.JF_REPO }}
|
||||
username: ${{ secrets.JF_USER }}
|
||||
password: ${{ secrets.JF_ACCESS_TOKEN }}
|
||||
|
||||
- name: Set Up Docker
|
||||
|
@ -144,7 +144,7 @@ jobs:
|
|||
|
||||
- name: Build Tag and push Docker Image
|
||||
env:
|
||||
IMAGE_NAME: rodi26.jfrog.io/rodi26-docker/jfrog-spring-petclinic:${{ github.run_number }}
|
||||
IMAGE_NAME: rodi26.jfrog.io/rodi26-docker/jfrog-spring-petclinic:latest
|
||||
run: |
|
||||
jf docker build -t $IMAGE_NAME .
|
||||
jf docker push $IMAGE_NAME
|
||||
|
|
10
readme.md
10
readme.md
|
@ -24,9 +24,17 @@ A robust CI pipeline has been set up with the following automated steps:
|
|||
3. **Dockerize**: Build and tag the Docker container for deployment.
|
||||
4. **Security Scan**: Launch a vulnerability scan to maintain robust security standards.
|
||||
|
||||
## Instruction to use the repo
|
||||
1. Create 4 variables
|
||||
- **JF_URL** : The url of your JFrog server
|
||||
- **JF_USER** : The user authorize to use xray
|
||||
- **JF_ACCESS_TOKEN** : your token to connect to Artifactory
|
||||
- **JF_REPO** : your artifactory repo (ex: myrepo.jfrog.io)
|
||||
2. Authorize Github Actions. The github action will only execute on your main branch.
|
||||
|
||||
## Docker Instructions
|
||||
|
||||
The `Dockerfile` is located in the root directory. You can run the application locally on a Linux environment using Docker with the following command:
|
||||
The `Dockerfile` is located in the root directory of the repo. You can run the application locally on a Linux environment using Docker with the following command:
|
||||
|
||||
```other
|
||||
docker run -d -p 8080:8080 rodi26.jfrog.io/rodi26-docker-local/jfrog-spring-petclinic:latest
|
||||
|
|
Loading…
Reference in a new issue