This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
53 lines (52 loc) · 2.07 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
53
jobs:
- job: Test
pool:
vmImage: 'Ubuntu 16.04'
variables:
NODE_VERSION: 12.16.1
SPRING_OUTPUT_ANSI_ENABLED: NEVER
SPRING_JPA_SHOW_SQL: false
JHI_DISABLE_WEBPACK_LOGS: true
NG_CLI_ANALYTICS: 'false'
steps:
#----------------------------------------------------------------------
# Install all tools and check configuration
#----------------------------------------------------------------------
- task: NodeTool@0
inputs:
versionSpec: '12.16.1'
displayName: 'TOOLS: install Node.js'
- script: sudo npm install -g npm
displayName: 'TOOLS: update NPM'
- script: sudo chown -R vsts:docker /home/vsts/.npm/
displayName: 'BUGS-FIX: change /home/vsts/.npm/ permission'
- script: sudo /etc/init.d/mysql stop
displayName: 'TOOLS: stop MySQL'
#----------------------------------------------------------------------
# Tests
#----------------------------------------------------------------------
- script: npm install
displayName: 'INSTALL: launch npm install'
- script: |
chmod +x mvnw
./mvnw -ntp checkstyle:check
./mvnw -ntp clean verify
displayName: 'TESTS: backend'
- script: ./mvnw -ntp com.github.eirslett:frontend-maven-plugin:npm -Dfrontend.npm.arguments='run test'
displayName: 'TESTS: frontend'
- script: ./mvnw -ntp verify -Pprod -DskipTests
displayName: 'TESTS: packaging'
#----------------------------------------------------------------------
# Continuous deployment
#----------------------------------------------------------------------
- script: ./mvnw package -Pprod -DskipTests
displayName: 'BUILD: creating production build'
- task: CopyFiles@2
inputs:
SourceFolder: 'target'
Contents: '*.jar'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: drop