Update maven.yml #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Maven CI Pipeline | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: maven:3-alpine | |
| options: --user root | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Build | |
| run: mvn -B -DskipTests clean package | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| container: | |
| image: maven:3-alpine | |
| options: --user root | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Run Tests | |
| run: mvn test | |
| - name: Publish Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: target/surefire-reports/*.xml | |
| deliver: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| container: | |
| image: maven:3-alpine | |
| options: --user root | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Deliver | |
| run: ./jenkins/scripts/deliver.sh |