wisemapping-open-source/bitbucket-pipelines.yml

40 lines
1.5 KiB
YAML
Raw Normal View History

# Template maven-build
# This template allows you to test and build your Java project with Maven.
# The workflow allows running tests, code checkstyle and security scans on the default branch.
# Prerequisites: pom.xml and appropriate project structure should exist in the repository.
2023-08-11 07:30:54 +02:00
image: maven:3.8.7
pipelines:
2022-01-24 00:54:57 +01:00
branches:
'{master,develop}':
- step:
name: Build and Test
caches:
- node
- maven
2022-01-24 01:28:16 +01:00
- docker
2022-01-24 00:54:57 +01:00
script:
# Compile sources ...
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
- . $HOME/.nvm/nvm.sh && nvm install node
2023-08-11 06:57:27 +02:00
- mvn clean install --file pom.xml -DskipTests
2022-01-24 01:28:16 +01:00
# Publish to docker repo ...
- docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
2023-06-30 04:46:28 +02:00
- docker build -t wisemapping/wisemapping:latest -f distribution/Dockerfile wise-webapp/target/
- docker push wisemapping/wisemapping:latest
2022-01-24 00:54:57 +01:00
after-script:
# Collect checkstyle results, if any, and convert to Bitbucket Code Insights.
- pipe: atlassian/checkstyle-report:0.3.0
services:
- docker
2022-01-24 01:22:31 +01:00
- step:
name: Security Scan
script:
# Run a security scan for sensitive data.
# See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security
- pipe: atlassian/git-secrets-scan:0.5.1
2022-01-24 00:54:57 +01:00