-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
62 lines (59 loc) · 2.18 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
# Starter pipeline DRAFT for azure CI
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- script: |
mkdir bin
displayName: Mk bin dir
- script: |
npm install
npm run build
workingDirectory: frontend/
displayName: Compile frontend
- script: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath
tar czf ../bin/foodhubber-v0.15.2-linux-amd64.tar.gz foodhubber
rm foodhubber
# CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -trimpath
# tar czf ../bin/foodhubber-v0.15.2-linux-arm.tar.gz foodhubber
# rm foodhubber
# CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath
# tar czf ../bin/foodhubber-v0.15.2-linux-arm64.tar.gz foodhubber
# rm foodhubber
# CGO_ENABLED=0 GOOS=linux GOARCH=riscv64 go build -trimpath
# tar czf ../bin/foodhubber-v0.15.2-linux-riscv64.tar.gz foodhubber
# rm foodhubber
# CGO_ENABLED=0 GOOS=linux GOARCH=s390x go build -trimpath
# tar czf ../bin/foodhubber-v0.15.2-linux-s390x.tar.gz foodhubber
# rm foodhubber
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -trimpath
zip -9 ../bin/foodhubber-v0.15.2-darwin-amd64.zip foodhubber
rm foodhubber
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -trimpath
zip -9 ../bin/foodhubber-v0.15.2-darwin-arm64.zip foodhubber
rm foodhubber
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath
zip -9 ../bin/foodhubber-v0.15.2-win-amd64.zip foodhubber.exe
rm foodhubber.exe
# CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -trimpath
# zip -9 ../bin/foodhubber-v0.15.2-win-arm64.zip foodhubber.exe
# rm foodhubber.exe
# CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -trimpath
# tar czf ../bin/foodhubber-v0.15.2-freebsd-amd64.tar.gz foodhubber
# rm foodhubber
# CGO_ENABLED=0 GOOS=freebsd GOARCH=arm64 go build -trimpath
# tar czf ../bin/foodhubber-v0.15.2-freebsd-arm64.tar.gz foodhubber
# rm foodhubber
workingDirectory: backend/
displayName: Compile backend
- task: CopyFiles@2
inputs:
sourceFolder: 'bin'
contents: '*'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: FoodHubber