forked from geonetwork/core-geonetwork
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines-e2e-test.yml
74 lines (71 loc) · 2.54 KB
/
azure-pipelines-e2e-test.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
variables:
- name: mavenCacheFolder
value: $(Pipeline.Workspace)/.m2/repository
- name: mavenCacheOpts
value: '-Dmaven.repo.local=$(mavenCacheFolder)'
stages:
- stage: e2e
pool: dv-prd-ubuntu2204
jobs:
- job: cypress
steps:
- checkout: self
displayName: Set up repository
submodules: recursive # needed for submodules
- task: Cache@2
inputs:
# bump 'versionx' to make sure the cache is cleared
key: 'version3 | maven | "$(Agent.OS)" | **/pom.xml'
restoreKeys: |
maven | "$(Agent.OS)"
maven
path: $(mavenCacheFolder)
displayName: Cache Maven local repo
- task: Maven@4
displayName: Build project artifacts
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m $(mavenCacheOpts)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'clean install'
options: ' -Pwar -Dmaven.artifact.threads=30 -Dwro4j-prebuild-cache '
- task: Bash@3
displayName: Set up liquibase properties
inputs:
workingDirectory: liquibase
targetType: inline
script: |
cp liquibase.properties.example liquibase.properties
- task: Bash@3
displayName: Run cypress tests
inputs:
workingDirectory: vlaanderen/cypress-e2e
targetType: inline
script: |
# make the folders to make sure they're not created by root
mkdir -p cypress/downloads
mkdir -p cypress/results
mkdir -p cypress/screenshots
mkdir -p cypress/videos
# for some weird reason, just upping e2e doesn't work and geonetwork fails with unhealthy state
# first get geonetwork 'warm', then launch e2e
docker compose up -d --wait geonetwork-reindexer
docker compose up e2e
docker compose down -v
ls -lsa cypress
ls -lsa cypress/downloads
echo "done"
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TEST-*.xml'
searchFolder: 'vlaanderen/cypress-e2e/cypress/results'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TEST-*.xml'
searchFolder: 'web/target/surefire-reports'