-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
47 lines (46 loc) · 1.89 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
jobs:
- job: Test
pool:
vmui: 'Ubuntu 16.04'
variables:
NODE_VERSION: 10.16.0
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: '10.16.0'
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 ./gradlew
./gradlew clean test integrationTest
displayName: 'TESTS: backend'
- script: ./gradlew bootJar -Pprod -x test
displayName: 'TESTS: packaging'
#----------------------------------------------------------------------
# Build
#----------------------------------------------------------------------
- script: ./gradlew bootJar -Pprod jibDockerBuild
displayName: 'BUILD: jibDockerBuild'
- script: sudo docker image tag ui acrdevozs.azurecr.io/ui
displayName: 'DOCKER: tag'
- script: sudo docker login -u acrdevozs -p $(acrdevozspass) acrdevozs.azurecr.io
displayName: 'DOCKER: login'
- script: sudo docker push acrdevozs.azurecr.io/ui
displayName: 'DOCKER: push'