-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
84 lines (74 loc) · 2.56 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
trigger:
branches:
include:
- master
- '*-dev'
- azure-pipelines
tags:
include:
- v*
name: $(Date:yyyyMMdd)$(Rev:.r)
variables:
system.debug: false
isTag: 'false'
isSnapshot: 'false'
jobs:
- job: build
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
lfs: true
- script: |
curl 'https://cdn.azul.com/zulu/bin/zulu17.30.15-ca-jdk17.0.1-linux_x64.tar.gz' --output $(Agent.TempDirectory)/jdk-latest-linux_x64.tar.gz
- task: JavaToolInstaller@0
inputs:
versionSpec: "17"
jdkArchitectureOption: x64
jdkSourceOption: LocalDirectory
jdkFile: $(Agent.TempDirectory)/jdk-latest-linux_x64.tar.gz
jdkDestinationDirectory: $(Agent.ToolsDirectory)/binaries/openjdk
cleanDestinationDirectory: true
- task: DownloadSecureFile@1
name: gpgKeyring
displayName: 'Download GPG Keyring'
inputs:
secureFile: 'keyring.gpg'
- bash: |
echo '##vso[task.setvariable variable=isTag;]true'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
- bash: |
echo '##vso[task.setvariable variable=isSnapshot;]true'
condition: and(succeeded(), endsWith(variables['Build.SourceBranch'], '-SNAPSHOT'))
- task: Gradle@2
env:
GPG_KEY_NAME: $(GPG_KEY_NAME)
GPG_PASSPHRASE: $(GPG_PASSPHRASE)
GPG_KEYRING_PATH: $(gpgKeyring.secureFilePath)
IS_TAG: $(isTag)
REPO_TAG_NAME: $(Build.SourceBranchName)
inputs:
workingDirectory: ''
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.17'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
testResultsFiles: '**/TEST-*.xml'
tasks: 'signPackageDistribution'
- task: GithubRelease@0
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
inputs:
gitHubConnection: binjr-bot
repositoryName: binjr/binjr-adapter-demo
action: edit
tag: $(Build.SourceBranchName)
assets: |
$(System.DefaultWorkingDirectory)/build/*.zip
$(System.DefaultWorkingDirectory)/build/*.asc
assetUploadMode: 'replace'
releaseNotesSource: 'file'
releaseNotesFile: $(System.DefaultWorkingDirectory)/UNRELEASED.md
addChangeLog: false
isPreRelease: $(isSnapshot)