-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathazure-pipelines.yml
66 lines (58 loc) · 1.58 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
57
58
59
60
61
62
63
64
65
66
pool:
vmImage: 'Ubuntu 16.04'
trigger:
branches:
include:
- master
- feature/*
- bug/*
pr:
branches:
include:
- master
steps:
- checkout: self
persistCredentials: true
clean: true
- task: UsePythonVersion@0
inputs:
versionSpec: 3.6
architecture: 'x64'
- script: |
python --version
pip --version
pip install awscli
displayName: 'Environment Preperation'
- script: |
mkdir .tmp
cd .tmp
aws s3 cp s3://vizcentric-pipeline-secrets/settings.xml .
mkdir ~/.m2
cp ./settings.xml ~/.m2/settings.xml
cd ../
env:
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
displayName: 'Get Secrets'
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
goals: 'package'
condition: ne(variables['Build.SourceBranch'], 'refs/heads/master')
displayName: 'Build'
- script: |
git checkout master
git config user.name "Release Bot"
git config user.email "admin@vizcentric.com"
mvn -B release:clean release:prepare release:perform -Dusername=${GIT_USERNAME} -Dpassword=${GIT_PASSWORD} "-DscmCommentPrefix=[skip ci] "
env:
GIT_USERNAME: $(GIT_USERNAME)
GIT_PASSWORD: $(GIT_PASSWORD)
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
displayName: 'Release'