Add Go build stage
@@ -28,6 +28,34 @@ variables:
k8sNamespaceForPR: '$(system.pullRequest.sourceBranch)'
stages:
+- stage: BinaryBuild
+ displayName: Build Binary
+ jobs:
+ - job:
+ steps:
+ - task: GoTool@0
+ inputs:
+ version: '1.13.7'
+ - task: Go@0
+ inputs:
+ command: 'get'
+ arguments: '-d'
+ workingDirectory: '$(System.DefaultWorkingDirectory)'
+ - task: Go@0
+ inputs:
+ command: 'test'
+ arguments: '-v -tags "$(Build.BuildId)" -coverprofile=coverage-unit.txt -covermode count -parallel 4 -timeout 10m'
+ - task: Go@0
+ inputs:
+ command: 'build'
+ workingDirectory: '$(System.DefaultWorkingDirectory)'
+ - task: CopyFiles@2
+ inputs:
+ TargetFolder: '$(Build.ArtifactStagingDirectory)'
+ - task: PublishBuildArtifacts@1
+ inputs:
+ artifactName: drop
+
- stage: Build
displayName: Build stage
