Branching Strategy
- Overview
Archiving Artifacts
- In branches where we run night builds we need to store the packages in some repository
-
We have sofwares such as
- Artifactory (Jfrog)
- Nexus Repository
- Azure Artifacts
- Github Releases
- Goal: Upload the package built to Package Repository
- Lets use jfrog trail version Refer Here
- Github Action connection guide to jfrog
- Spring petclinic
---
name: Manual maven steps for ci
on:
push:
branches:
- rel_v1
workflow_dispatch:
permissions:
contents: read
checks: write
pull-requests: write
actions: read
security-events: write
jobs:
manual:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
java: [21]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: maven
- uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: ${{ vars.JF_URL }}
JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
- run: |
jf --version
jf rt ping
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java
- name: build package
run: mvn package
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
**/target/surefire-reports/*.xml
- name: Uploading packaged jar files
uses: actions/upload-artifact@v4
with:
name: spring-petclinic-${{ matrix.java }}.jar
path: '**/target/*.jar'
- name: Maven Build and Deploy to Artifactory
run: |
jf mvn-config --repo-deploy-releases=learning-libs-release --repo-deploy-snapshots=learning-libs-snapshot
jf mvn deploy
jf rt bp # Optional: Deploy build info
