diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index c93d73b4d..4aceeb9d5 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -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 diff --git a/readme.md b/readme.md index 6756528f9..6bafe7429 100644 --- a/readme.md +++ b/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