mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-13 00:16:19 +03:00
52b9eabbcc
This reverts commit 61e9df3eaf
.
This interacts very badly with the fact that we check out old commits
for releases. While we could fix it for this particular issue, I don’t
think this buys us enough to make this worth doing and it makes it
easy to introduce issues in the future if we modify lib.sh
changelog_begin
changelog_end
69 lines
2.6 KiB
YAML
69 lines
2.6 KiB
YAML
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
parameters:
|
|
release_tag: ''
|
|
is_release: ''
|
|
|
|
steps:
|
|
- 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)
|
|
|
|
- powershell: '.\ci\windows-diagnostics.ps1'
|
|
displayName: 'Agent diagnostics'
|
|
|
|
- powershell: '.\build.ps1'
|
|
displayName: 'Build'
|
|
env:
|
|
DAML_SDK_RELEASE_VERSION: ${{parameters.release_tag}}
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
condition: failed()
|
|
displayName: 'Publish the bazel test logs'
|
|
inputs:
|
|
pathtoPublish: 'bazel-testlogs/'
|
|
artifactName: 'Test logs'
|
|
|
|
- bash: |
|
|
set -euo pipefail
|
|
INSTALLER=daml-sdk-${{parameters.release_tag}}-windows.exe
|
|
mv "bazel-bin/release/windows-installer/daml-sdk-installer.exe" "$(Build.StagingDirectory)/$INSTALLER"
|
|
chmod +wx "$(Build.StagingDirectory)/$INSTALLER"
|
|
cleanup () {
|
|
rm -f signing_key.pfx
|
|
}
|
|
trap cleanup EXIT
|
|
echo "$SIGNING_KEY" | base64 -d > signing_key.pfx
|
|
MSYS_NO_PATHCONV=1 signtool.exe sign '/f' signing_key.pfx '/fd' sha256 '/tr' "http://timestamp.digicert.com" '/v' "$(Build.StagingDirectory)/$INSTALLER"
|
|
rm signing_key.pfx
|
|
trap - EXIT
|
|
echo "##vso[task.setvariable variable=installer;isOutput=true]$INSTALLER"
|
|
TARBALL=daml-sdk-${{parameters.release_tag}}-windows.tar.gz
|
|
cp bazel-bin/release/sdk-release-tarball.tar.gz '$(Build.StagingDirectory)'/$TARBALL
|
|
echo "##vso[task.setvariable variable=tarball;isOutput=true]$TARBALL"
|
|
name: publish
|
|
env:
|
|
SIGNING_KEY: $(microsoft-code-signing)
|
|
DAML_SDK_RELEASE_VERSION: ${{parameters.release_tag}}
|
|
condition: and(succeeded(),
|
|
eq(${{parameters.is_release}}, 'true'),
|
|
eq(variables['Build.SourceBranchName'], 'master'))
|
|
- task: PublishPipelineArtifact@0
|
|
condition: and(succeeded(),
|
|
eq(${{parameters.is_release}}, 'true'),
|
|
eq(variables['Build.SourceBranchName'], 'master'))
|
|
inputs:
|
|
targetPath: $(Build.StagingDirectory)/$(publish.installer)
|
|
artifactName: $(publish.installer)
|
|
- task: PublishPipelineArtifact@0
|
|
condition: and(succeeded(),
|
|
eq(${{parameters.is_release}}, 'true'),
|
|
eq(variables['Build.SourceBranchName'], 'master'))
|
|
inputs:
|
|
targetPath: $(Build.StagingDirectory)/$(publish.tarball)
|
|
artifactName: $(publish.tarball)
|