54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
pipeline:
|
|
debug-env:
|
|
image: alpine
|
|
commands:
|
|
- echo "Username set: ${GITHUB_USERNAME:+yes}"
|
|
- echo "Token set: ${GITHUB_PAT:+yes}"
|
|
|
|
ghcr-login:
|
|
image: docker:cli
|
|
environment:
|
|
- GITHUB_PAT
|
|
- GITHUB_USERNAME
|
|
commands:
|
|
- echo $GITHUB_PAT | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin
|
|
|
|
restore-cache:
|
|
image: plugins/cache
|
|
settings:
|
|
restore: true
|
|
mount:
|
|
- /root/.m2
|
|
- frontend/node_modules
|
|
path: /tmp/woodpecker-cache
|
|
|
|
backend-build:
|
|
image: maven:3.9-eclipse-temurin-17
|
|
commands:
|
|
- echo "Building backend + frontend"
|
|
- mvn clean install -Pprod -DskipTests
|
|
when:
|
|
branch:
|
|
include:
|
|
- main
|
|
- master
|
|
- develop
|
|
|
|
save-cache:
|
|
image: plugins/cache
|
|
settings:
|
|
rebuild: true
|
|
mount:
|
|
- /root/.m2
|
|
- frontend/node_modules
|
|
path: /tmp/woodpecker-cache
|
|
|
|
save-artifacts:
|
|
image: woodpeckerci/plugin-artifacts
|
|
settings:
|
|
path: /output/resilient*.jar
|
|
|
|
volumes:
|
|
build:
|
|
host:
|
|
path: /tmp/woodpecker-artifacts
|