Files
Remsly/bitbucket-pipelines.yml
T

49 lines
1.3 KiB
YAML

# This is a sample build configuration for Java (Gradle).
# Check our guides at https://confluence.atlassian.com/x/zd-5Mw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: java:8
pipelines:
default:
- step:
name: Clean
image: java:8
script:
- bash ./gradlew clean
- step:
name: Backend
caches:
- gradle
script:
- bash ./gradlew :backend:build
- bash mv backend/build/libs/*.jar backend/build/libs/backend-$(git describe --tags).jar
artifacts:
- backend/build/libs/*.jar
- step:
name: FrontEnd
image: node:12.7
script:
- cd frontend
- npm install
- npm install -g @angular/cli
- ng build
tags:
*:
- step:
name: Prod-FE-Build
image: node:12.7
script:
- cd frontend
- npm install
- npm install -g @angular/cli
- ng build --prod --aot
- mv dist data
- chmod -R a+rwx data
- tar czvf "frontend-$(git describe --tags).tar.gz" data
- rm -rf data
- cd ..
artifacts:
- frontend/*.tar.gz