-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
54 lines (44 loc) · 1.31 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
# Kafka Serde Pipeline
trigger:
- main
- develop
pr:
- main
- develop
pool:
vmImage: 'ubuntu-18.04'
jobs:
- job: PackageTest
displayName: Package, Test, and Deploy
steps:
- checkout: self
persistCredentials: true
displayName: Checkout Code
- task: DownloadSecureFile@1
name: sbtCredentials
displayName: 'SBT Credentials File'
inputs:
secureFile: 'sbt-credentials'
- script: |
mkdir -p $HOME/.sbt
ln -s $(sbtCredentials.secureFilePath) $HOME/.sbt/.credentials
displayName: 'Load SBT Credentials'
- script: sbt clean +package +test
displayName: 'Build and Test with sbt'
- script: |
sbt clean +publish
displayName: Publish Dev Artifact
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
- script: |
git checkout main
git config --global user.name "AzurePipelines"
git config --global user.email "[email protected]"
sbt "release cross with-defaults"
displayName: Release and tag
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- script: |
git checkout develop
git merge origin/main
git push origin develop
displayName: Update develop
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))