diff --git a/.woodpecker.yml b/.woodpecker.yml index dd302fe..0b5d992 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,11 +2,11 @@ pipeline: docker-login: image: docker environment: - - GITHUB_PAT - - GITHUB_USERNAME + GITHUB_PAT: from_secret:GITHUB_PAT + GITHUB_USERNAME: from_secret:GITHUB_USERNAME commands: - echo $GITHUB_PAT | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin - + restore-cache: image: plugins/cache settings: @@ -15,19 +15,22 @@ pipeline: - /root/.m2 - frontend/node_modules path: /tmp/woodpecker-cache - + backend-build: image: maven:3.9-eclipse-temurin-17 + volumes: + - build:/output commands: - echo "Building backend + frontend" - mvn clean install -Pprod -DskipTests + - cp target/resilient*.jar /output/ when: branch: include: - main - master - develop - + save-cache: image: plugins/cache settings: @@ -36,14 +39,14 @@ pipeline: - /root/.m2 - frontend/node_modules path: /tmp/woodpecker-cache - + save-artifacts: image: ghcr.io/woodpecker-ci/plugin-artifacts settings: files: - /output/resilient*.jar destination: build - + volumes: build: host: