mirror of
https://github.com/digital-asset/daml.git
synced 2024-08-17 00:30:25 +03:00
Docker cron: fix, and improve perf (#4055)
CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
0c4f9d7f92
commit
0b1a2d1577
@ -58,6 +58,8 @@ jobs:
|
||||
set -euo pipefail
|
||||
|
||||
eval "$(dev-env/bin/dade-assist)"
|
||||
HEAD=$(git rev-parse HEAD)
|
||||
while ! nix-build -A tools.sed -A tools.jq -A tools.curl nix; do :; done
|
||||
echo $DOCKER_PASSWORD | docker login --username $DOCKER_LOGIN --password-stdin
|
||||
RELEASES=$(curl https://api.github.com/repos/digital-asset/daml/releases -s | jq -r '. | map(select(.prerelease == false)) | map(.tag_name)[]')
|
||||
DIR=$(pwd)
|
||||
@ -67,17 +69,17 @@ jobs:
|
||||
# We do not update docker images for older releases so only docker images for SDK releases
|
||||
# >= 0.13.43 are built this way.
|
||||
for version in $(echo $RELEASES | sed -e 's/ /\n/g'); do
|
||||
git checkout "$version"
|
||||
while ! nix-build -A tools -A cached nix; do; done
|
||||
LAST_UPDATE=$(echo $VERSIONS | jq -r '.results[] | select(.name == "'${version#v}'") | .last_updated')
|
||||
if [[ -n "$LAST_UPDATE" ]]; then
|
||||
echo "${version#v} already exists, skipping."
|
||||
else
|
||||
echo "Building version ${version#v}..."
|
||||
git checkout "$version"
|
||||
cd ci/docker/daml-sdk
|
||||
docker build -t digitalasset/daml-sdk:${version#v} --build-arg VERSION=${version#v} .
|
||||
docker push digitalasset/daml-sdk:${version#v}
|
||||
cd "$DIR"
|
||||
git checkout $HEAD
|
||||
echo "Done."
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user