This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
71 lines (61 loc) · 1.91 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
- release/*
- develop
- feature/*
pool:
vmImage: 'ubuntu-latest'
steps:
# Download the pgp keys from azure secure library
- task: DownloadSecureFile@1
displayName: 'Get secring.asc from Azure Secure Library'
inputs:
secureFile: "secring.asc"
- task: DownloadSecureFile@1
displayName: 'Get pubring.asc from Azure Secure Library'
inputs:
secureFile: "pubring.asc"
- script: |
mkdir -p /tmp/pgp && \
mv $(DownloadSecureFile1.secureFilePath) /tmp/pgp && \
mv $(DownloadSecureFile2.secureFilePath) /tmp/pgp
displayName: 'Move pgp keys'
- script: |
docker-compose \
-f src/it/resources/docker-compose.yml \
up \
--build \
-d
displayName: 'Create a docker-compose based testing environment (including idle mozilla/sbt:8u212_1.2.8)'
- script: |
docker exec \
sbt \
./sbt "+test"
displayName: 'sbt test'
- script: |
docker exec \
sbt \
./sbt "+it:test"
displayName: 'sbt it:test'
- script: |
docker exec \
-e SONATYPE_USERNAME=$(SONATYPE_USERNAME) \
-e SONATYPE_PASSWORD=$(SONATYPE_PASSWORD) \
-e PGP_PASSPHRASE=$(PGP_PASSPHRASE) \
sbt \
./sbt "+publishSigned"
displayName: 'sbt publishSigned (push to https://oss.sonatype.org/content/groups/staging/ai/tripl/)'
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/heads/release'))
- script: |
docker exec \
-e SONATYPE_USERNAME=$(SONATYPE_USERNAME) \
-e SONATYPE_PASSWORD=$(SONATYPE_PASSWORD) \
-e PGP_PASSPHRASE=$(PGP_PASSPHRASE) \
sbt \
./sbt "sonatypeRelease"
displayName: 'sbt sonatypeRelease (push to https://repo1.maven.org/maven2/ai/tripl/)'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))