Skip to content

Adding Chainloop

Adding Chainloop #13

name: Demo Spring Petclinic - Testing
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
env:
CHAINLOOP_TOKEN: ${{ secrets.CHAINLOOP_TOKEN }}
strategy:
matrix:
java: [ '17' ]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{matrix.java}}
uses: actions/setup-java@v4
with:
java-version: ${{matrix.java}}
distribution: 'adopt'
cache: maven
- name: Install dependencies and tools.
run: |
mkdir -p metadata
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
curl -sfL https://raw.githubusercontent.com/chainloop-dev/chainloop/01ad13af08950b7bfbc83569bea207aeb4e1a285/docs/static/install.sh | bash -s
- name: Build the jar file and generate SBOM.
run: |
VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
chainloop attestation init --workflow test --project demo-spring-petclinic --contract demo-spring-petclinic --version "$VERSION"
./mvnw clean verify jacoco:report > test.log 2>&1
chainloop attestation add --name test-log --value ./test.log
chainloop attestation add --name test-report --value target/site/jacoco/jacoco.xml
chainloop attestation push