Skip to content

Commit

Permalink
add gcloud to windows dev-env (#16732)
Browse files Browse the repository at this point in the history
* add gcloud to windows dev-env

* fix da-ghc-lib
  • Loading branch information
garyverhaegen-da authored Apr 21, 2023
1 parent dd82500 commit cb87f48
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dadew
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"bazel",
"cacert",
"curl",
"gcloud",
"ojdkbuild11",
"maven-3.6.1",
"msys2",
Expand Down
6 changes: 4 additions & 2 deletions ci/da-ghc-lib/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- bash: |
set -euo pipefail
eval "$(dev-env/bin/dade-assist)"
CACHE_KEY="$(find ci/da-ghc-lib -type f -print0 | sort -z | xargs -r0 md5sum | md5sum | awk '{print $1}')"
LIB="ghc-lib-$CACHE_KEY.tar.gz"
PARSER="ghc-lib-parser-$CACHE_KEY.tar.gz"
Expand Down Expand Up @@ -81,8 +83,8 @@ jobs:
# This will break on external PRs.
echo "$GOOGLE_APPLICATION_CREDENTIALS_CONTENT" > $GCS_KEY
gcloud auth activate-service-account --key-file=$GCS_KEY
BOTO_CONFIG=/dev/null gsutil cp -n "ghc-lib-${VERSION}.tar.gz" "gs://daml-binaries/$LIB"
BOTO_CONFIG=/dev/null gsutil cp -n "ghc-lib-parser-${VERSION}.tar.gz" "gs://daml-binaries/$PARSER"
BOTO_CONFIG=/dev/null gsutil cp -n "ghc-lib-${VERSION}.tar.gz" "gs://daml-binaries/da-ghc-lib/$LIB"
BOTO_CONFIG=/dev/null gsutil cp -n "ghc-lib-parser-${VERSION}.tar.gz" "gs://daml-binaries/da-ghc-lib/$PARSER"
echo "Please add(/replace) the following lines to bazel-haskell-deps.bzl:"
echo "GHC_LIB_REV = \"$CACHE_KEY\""
echo "GHC_LIB_SHA256 = \"$(sha256sum ghc-lib-${VERSION}.tar.gz | awk '{print $1}')\""
Expand Down
46 changes: 46 additions & 0 deletions dev-env/windows/manifests/gcloud.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"_taken-from": "https://github.com/ScoopInstaller/Extras/blob/104f6ffb5d55425477659927274d85f621f4b95d/bucket/gcloud.json",
"_taken_from_license": "http://unlicense.org/",
"version": "427.0.0",
"description": "Command-line interface for Google Cloud Platform products and services.",
"homepage": "https://cloud.google.com/sdk/",
"license": "Proprietary",
"notes": "To initialize Cloud SDK, you will need to run: 'gcloud init'",
"depends": "7zip19.00-helper",
"architecture": {
"64bit": {
"url": "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-427.0.0-windows-x86_64-bundled-python.zip#/dl.zip_",
"hash": "1ac06d4f0f924b245404beca2f7a1603321ae077c0f023c652422db15d0bc9f5"
},
"32bit": {
"url": "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-427.0.0-windows-x86-bundled-python.zip#/dl.zip_",
"hash": "2bda37924f837d86a5665724fe496283000964c110f9a2a6c0ef000dbeab7932"
}
},
"pre_install": [
"Invoke-ExternalCommand 7z1900-helper -ArgumentList @('x', '-bso0', \"$dir\\dl.zip_\", \"-o$dir\") | Out-Null",
"Move-Item \"$dir\\google-cloud-sdk\\*\" \"$dir\\\" | Out-Null",
"Remove-Item \"$dir\\google-cloud-sdk\", \"$dir\\dl.zip_\" -Force -Recurse"
],
"bin": [
"bin\\gcloud.cmd",
"bin\\gsutil.cmd",
"bin\\bq.cmd",
"bin\\docker-credential-gcloud.cmd",
"bin\\git-credential-gcloud.cmd"
],
"checkver": {
"url": "https://cloud.google.com/sdk/docs/downloads-versioned-archives",
"regex": "google-cloud-sdk-([\\d.]+)-windows-x86_64-bundled"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$version-windows-x86_64-bundled-python.zip#/dl.zip_"
},
"32bit": {
"url": "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$version-windows-x86-bundled-python.zip#/dl.zip_"
}
}
}
}

0 comments on commit cb87f48

Please sign in to comment.