forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move artifact publishing out of yaml files (digital-asset#9071)
* Move artifact publishing out of yaml files The current publishing process pretty much hardcodes the set of artifacts we publish in the yaml config. This is a problem because we always release from `main` so the yaml files are always identical. However, we will add new artifacts over time and this starts falling apart. This PR changes this such that the process described in the yaml files is very generic and just uploads and downloads everything in a directory whereas the details are handled in bash scripts that will come from the respective release branch and are therefore version-dependent. As usual for these type of changes, I don’t have a great way to test this. I did do some due diligence to test that at least the artifacts are published correctly and I can download them but I can’t test the actual publishing. changelog_begin changelog_end * Update ci/copy-unix-release-artifacts.sh Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com> * Update ci/copy-windows-release-artifacts.sh Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com> * Update ci/publish-artifactory.sh Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com> Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
- Loading branch information
1 parent
0e4af74
commit 979e12f
Showing
8 changed files
with
126 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
set -euo pipefail | ||
|
||
RELEASE_TAG=$1 | ||
NAME=$2 | ||
OUTPUT_DIR=$3 | ||
|
||
mkdir -p $OUTPUT_DIR/github | ||
mkdir -p $OUTPUT_DIR/artifactory | ||
|
||
|
||
TARBALL=daml-sdk-$RELEASE_TAG-$NAME.tar.gz | ||
cp bazel-bin/release/sdk-release-tarball.tar.gz $OUTPUT_DIR/github/$TARBALL | ||
|
||
# Platform independent artifacts are only built on Linux. | ||
if [[ "$NAME" == "linux" ]]; then | ||
PROTOS_ZIP=protobufs-$RELEASE_TAG.zip | ||
cp bazel-bin/release/protobufs.zip $OUTPUT_DIR/github/$PROTOS_ZIP | ||
|
||
DAML_ON_SQL=daml-on-sql-$RELEASE_TAG.jar | ||
bazel build //ledger/daml-on-sql:daml-on-sql-binary_deploy.jar | ||
cp bazel-bin/ledger/daml-on-sql/daml-on-sql-binary_deploy.jar $OUTPUT_DIR/github/$DAML_ON_SQL | ||
|
||
JSON_API=http-json-$RELEASE_TAG.jar | ||
bazel build //ledger-service/http-json:http-json-binary_deploy.jar | ||
cp bazel-bin/ledger-service/http-json/http-json-binary_deploy.jar $OUTPUT_DIR/github/$JSON_API | ||
|
||
TRIGGER_SERVICE=trigger-service-$RELEASE_TAG.jar | ||
bazel build //triggers/service:trigger-service-binary_deploy.jar | ||
cp bazel-bin/triggers/service/trigger-service-binary_deploy.jar $OUTPUT_DIR/github/$TRIGGER_SERVICE | ||
|
||
OAUTH2_MIDDLEWARE=oauth2-middleware-$RELEASE_TAG.jar | ||
bazel build //triggers/service/auth:oauth2-middleware-binary_deploy.jar | ||
cp bazel-bin/triggers/service/auth/oauth2-middleware-binary_deploy.jar $OUTPUT_DIR/github/$OAUTH2_MIDDLEWARE | ||
|
||
|
||
TRIGGER=daml-trigger-runner-$RELEASE_TAG.jar | ||
bazel build //triggers/runner:trigger-runner_deploy.jar | ||
cp bazel-bin/triggers/runner/trigger-runner_deploy.jar $OUTPUT_DIR/artifactory/$TRIGGER | ||
|
||
SCRIPT=daml-script-$RELEASE_TAG.jar | ||
bazel build //daml-script/runner:script-runner_deploy.jar | ||
cp bazel-bin/daml-script/runner/script-runner_deploy.jar $OUTPUT_DIR/artifactory/$SCRIPT | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
set -eou pipefail | ||
|
||
RELEASE_TAG=$1 | ||
OUTPUT_DIR=$2 | ||
|
||
mkdir -p $OUTPUT_DIR/github | ||
INSTALLER=daml-sdk-$RELEASE_TAG-windows.exe | ||
mv "bazel-bin/release/windows-installer/daml-sdk-installer.exe" "$OUTPUT_DIR/github/$INSTALLER" | ||
chmod +wx "$OUTPUT_DIR/github/$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 | ||
TARBALL=daml-sdk-$RELEASE_TAG-windows.tar.gz | ||
cp bazel-bin/release/sdk-release-tarball.tar.gz "$OUTPUT_DIR/github/$TARBALL" |
Oops, something went wrong.