forked from sjackman/linuxbrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
60 lines (58 loc) · 1.69 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
trigger: none
pr:
autoCancel: true
branches:
include:
- '*'
jobs:
- job: BuildLinuxbrewCoreBottles
timeoutInMinutes: 360
pool:
vmImage: ubuntu-latest
container:
image: homebrew/brew
steps:
- script: printenv
displayName: Azure printenv
- bash: |
sudo adduser $(whoami) linuxbrew
displayName: Setup user
- bash: |
git config --global user.name LinuxbrewTestBot
git config --global user.email [email protected]
displayName: Setup git
- bash: |
git checkout -b test
git fetch origin "master:master" "pull/$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER/head:pr"
git checkout pr
rm -rf $(brew --repository $BUILD_REPOSITORY_NAME)
ln -s $BUILD_REPOSITORY_LOCALPATH $(brew --repository $BUILD_REPOSITORY_NAME)
displayName: Setup tap
- bash: brew update-reset $(brew --repository)
displayName: Update Homebrew
- bash: |
mkdir /tmp/bottles
cd /tmp/bottles
brew test-bot \
--tap=homebrew/core \
--bintray-org=linuxbrew \
--git-name=LinuxbrewTestBot \
--keep-old
if [ $? -gt 0 ]; then
echo "$SYSTEM_PULLREQUEST_SOURCECOMMITID" > build_status.txt
exit 1
fi
displayName: Build bottles
continueOnError: true
- bash: |
cp /tmp/bottles/*.bottle.* $BUILD_ARTIFACTSTAGINGDIRECTORY
cp /tmp/bottles/build_status.txt $BUILD_ARTIFACTSTAGINGDIRECTORY || true
displayName: Copy bottles
condition: always()
- task: PublishPipelineArtifact@0
inputs:
artifactName: bottle-linux
targetPath: $(Build.ArtifactStagingDirectory)
displayName: Publish bottles
condition: always()