forked from molgenis/molgenis-emx2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
52 lines (47 loc) · 1.59 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Gradle
# Build your Java project and run tests with Gradle using a Gradle wrapper script.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
#trigger only on master or PR to master
trigger:
- master
pr:
- master
resources:
containers:
- container: postgres
image: postgres:14-alpine
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
services:
postgres: postgres
steps:
- script: |
git fetch --all --tags
- script: |
sudo apt-get update && sudo apt-get install postgresql-client python3 python3-venv -y
displayName: postgresql client python3
- script: |
psql -h localhost -p 5432 -U postgres < .docker/initdb.sql
displayName: initialize database
env:
PGPASSWORD: postgres
- script: |
sudo update-alternatives --display java
displayName: list available java versions (for debug purposes)
- script: |
export JAVA_HOME=/usr/lib/jvm/temurin-17-jdk-amd64/
./gradlew -version
./gradlew test jacocoMergedReport
# sonarqube -Dsonar.login=$(SONAR_TOKEN) -Dsonar.organization=molgenis -Dsonar.host.url=https://sonarcloud.io -Dorg.ajoberstar.grgit.auth.username=$(GITHUB_TOKEN) -Dorg.ajoberstar.grgit.auth.password
displayName: run test, ensure we are using java 17 JAVA_HOME
env:
MOLGENIS_POSTGRES_USER: molgenis
MOLGENIS_POSTGRES_PASS: molgenis
MOLGENIS_POSTGRES_URI: jdbc:postgresql://localhost/molgenis
JVM_OPTS: -Xmx3200m
NODE_OPTIONS: "--max-old-space-size=4096"
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2"
CI: true