Skip to content

Commit

Permalink
stop publishing daml-sdk image (digital-asset#17132)
Browse files Browse the repository at this point in the history
  • Loading branch information
garyverhaegen-da authored Jul 17, 2023
1 parent def34a8 commit c71b781
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 140 deletions.
56 changes: 0 additions & 56 deletions azure-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,62 +57,6 @@ jobs:
GCRED: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
- template: ci/tell-slack-failed.yml

- job: docker_image
timeoutInMinutes: 60
pool:
name: 'ubuntu_20_04'
demands: assignment -equals default
steps:
- checkout: self
- bash: |
set -euo pipefail
eval "$(dev-env/bin/dade-assist)"
HEAD=$(git rev-parse HEAD)
while ! nix-build --no-out-link -A tools.sed -A tools.jq -A tools.curl -A tools.base64 nix; do :; done
trap 'rm -rf ~/.docker' EXIT
echo $DOCKER_PASSWORD | docker login --username $DOCKER_LOGIN --password-stdin
echo $DOCKER_CONTENT_TRUST_KEY | base64 -d > ~/.docker/da_automation.key
chmod 600 ~/.docker/da_automation.key
docker trust key load ~/.docker/da_automation.key --name $DOCKER_CONTENT_TRUST_USERNAME
RELEASES=$(curl https://api.github.com/repos/digital-asset/daml/releases -sSfL | jq -r '.[] | .tag_name')
DIR=$(pwd)
VERSIONS=$(curl 'https://hub.docker.com/v2/repositories/digitalasset/daml-sdk/tags/?page_size=10000' -sSfL)
# Our docker tags should be stable. Therefore, we only build the image if it has not already
# been built before and we checkout the Dockerfile for the release tag.
# 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
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} .
#git checkout Dockerfile
# Despite the name not suggesting it at all, this actually signs
# _and pushes_ the image; see
# https://docs.docker.com/engine/security/trust/#signing-images-with-docker-content-trust
docker trust sign digitalasset/daml-sdk:${version#v}
cd "$DIR"
git checkout $HEAD
echo "Done."
fi
done
env:
DOCKER_LOGIN: $(DOCKER_LOGIN)
DOCKER_PASSWORD: $(DOCKER_PASSWORD)
DOCKER_CONTENT_TRUST_KEY: $(DOCKER_CONTENT_TRUST_KEY)
DOCKER_CONTENT_TRUST_USERNAME: $(DOCKER_CONTENT_TRUST_USERNAME)
# Does not appear explicitly in the script, but is used by
# docker trust key load
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: $(DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE)
- template: ci/tell-slack-failed.yml

- job: vscode_marketplace
timeoutInMinutes: 10
pool:
Expand Down
68 changes: 0 additions & 68 deletions ci/docker/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions ci/docker/daml-sdk/Dockerfile

This file was deleted.

0 comments on commit c71b781

Please sign in to comment.