-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
56 lines (46 loc) · 1.46 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
54
55
56
name: $(Build.SourceBranch)-$(date:yyyyMMdd)$(rev:.r)
parameters:
- name: 'mavenContainer'
default: 'maven:3-jdk-11'
# Pipeline triggers on any branch and tag
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
resources:
containers:
- container: 'ubuntu_container_for_build_to_nexus'
image: 'ubuntu:latest'
repositories:
- repository: templates
type: github
name: descoped/azure-pipelines-templates
ref: refs/tags/0.1.2
endpoint: descoped (6)
# Pipeline will be run on this base image
pool:
vmImage: 'ubuntu-latest'
# Variables global to this pipeline
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables
variables:
# Variables defined in Pipelines->Library->Variable Groups in your project in
# Azure Pipelines
- group: Hemmeligheter
# Variables defined here
- name: MAVEN_CACHE_FOLDER
value: $(Pipeline.Workspace)/.m2/repository
- name: MAVEN_OPTS
value: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
# Job which will run mvn build, mvn install and Sonar Analysis (if branch is master)
jobs:
- job: buildTest
displayName: 'compile deploy app'
container: ${{ parameters.mavenContainer }}
# Job condition: Run these jobs on any branch, but not on tags
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/tags'))
# Steps in this Job
steps:
- template: maven/task-maven-complete.yml@templates