2019-04-04 11:33:38 +03:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
2019-04-11 15:26:55 +03:00
|
|
|
|
|
|
|
- bash: ci/configure-bazel.sh
|
|
|
|
displayName: 'Configure Bazel'
|
|
|
|
env:
|
|
|
|
IS_FORK: $(System.PullRequest.IsFork)
|
|
|
|
# to upload to the bazel cache
|
|
|
|
GOOGLE_APPLICATION_CREDENTIALS_CONTENT: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
|
|
|
|
|
2019-05-10 15:13:30 +03:00
|
|
|
- powershell: '.\build.ps1'
|
2019-04-11 15:26:55 +03:00
|
|
|
displayName: 'Build'
|
2019-04-26 13:23:13 +03:00
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
displayName: 'Publish the bazel execution logs'
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
artifactName: 'Execution logs'
|
|
|
|
|
2019-05-14 17:18:55 +03:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
condition: failed()
|
|
|
|
displayName: 'Publish the bazel test logs'
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: 'bazel-testlogs/'
|
|
|
|
artifactName: 'Test logs'
|
|
|
|
|
2019-04-25 04:57:32 +03:00
|
|
|
- bash: |
|
|
|
|
set -euo pipefail
|
|
|
|
echo "Simulating release step..."
|
|
|
|
echo "##vso[task.setvariable variable=has_released;isOutput=true]true"
|
|
|
|
echo "##vso[task.setvariable variable=release_tag]$(cat VERSION)"
|
2019-04-26 04:14:50 +03:00
|
|
|
name: release
|
2019-05-14 17:18:55 +03:00
|
|
|
|
2019-04-25 04:57:32 +03:00
|
|
|
- bash: |
|
|
|
|
set -euo pipefail
|
|
|
|
ARTIFACT=daml-sdk-$(release_tag)-windows.tar.gz
|
2019-04-26 04:14:50 +03:00
|
|
|
cp bazel-genfiles/release/sdk-release-tarball.tar.gz '$(Build.StagingDirectory)'/$ARTIFACT
|
2019-04-25 04:57:32 +03:00
|
|
|
echo "##vso[task.setvariable variable=artifact;isOutput=true]$ARTIFACT"
|
2019-04-30 15:39:28 +03:00
|
|
|
WINDOWS_INSTALLER=daml-sdk-$(release_tag)-windows.exe
|
|
|
|
cp bazel-genfiles/release/windows-installer/daml-sdk-installer.exe '$(Build.StagingDirectory)'/$WINDOWS_INSTALLER
|
|
|
|
echo "##vso[task.setvariable variable=artifact-windows-installer;isOutput=true]$WINDOWS_INSTALLER"
|
2019-04-25 04:57:32 +03:00
|
|
|
name: publish
|
|
|
|
condition: eq(variables['release.has_released'], 'true')
|
2019-05-14 17:18:55 +03:00
|
|
|
|
2019-04-25 04:57:32 +03:00
|
|
|
- task: PublishPipelineArtifact@0
|
|
|
|
condition: eq(variables['release.has_released'], 'true')
|
|
|
|
inputs:
|
|
|
|
targetPath: $(Build.StagingDirectory)/$(publish.artifact)
|
|
|
|
artifactName: $(publish.artifact)
|
2019-05-14 17:18:55 +03:00
|
|
|
|
2019-04-30 15:39:28 +03:00
|
|
|
- task: PublishPipelineArtifact@0
|
|
|
|
condition: eq(variables['release.has_released'], 'true')
|
|
|
|
inputs:
|
|
|
|
targetPath: $(Build.StagingDirectory)/$(publish.artifact-windows-installer)
|
|
|
|
artifactName: $(publish.artifact-windows-installer)
|