Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 9 additions & 38 deletions docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,46 +105,17 @@ on GitHub (beyond the sources automatically provided there). Instead we add
a Downloads section that notes the exact tags and digests that the images can
be found at on quay.io.

The downloads section can be generated using the following shell script:
```bash
#!/usr/bin/env bash
# Requires `skopeo` and `jq` to be installed.

set -e

sk_digest() {
skopeo inspect "docker://${1}" | jq -r .Digest
}

image_info() {
curr_img="quay.io/samba.org/${1}:${2}"
digest=$(sk_digest "${curr_img}")
# strip preN from tag name
final_tag="$(echo "$2" | sed 's,pre[0-9]*$,,')"
tag_img="quay.io/samba.org/${1}:${final_tag}"
dst_img="quay.io/samba.org/${1}@${digest}"

echo "### $1"
echo "* By tag: $tag_img"
echo "* By digest: $dst_img"
echo ""
}

wip_tag=$1
if [ -z "${wip_tag}" ] ; then
echo "No tag provided!" >&2
exit 1
fi

echo "## Downloads"
echo ""
echo "Images built for this release can be acquired from the quay.io image registry."
echo ""
for component in samba-server samba-ad-server samba-client samba-toolbox; do
image_info "${component}" "${wip_tag}"
done
The downloads section can be generated using the shell script
https://github.com/samba-in-kubernetes/samba-container/blob/master/hack/install-tools.sh in this repository.

It needs to be invoked with the release tag as the only argument. E. G. :

```console

$ ./hack/release-gen-download-section.sh v0.3
```


It is important that the digest is fetched from qauy.io after it has been
pushed. Do not use any local digest hashes. You may want to double check the
values produced by the script with those in the quay.io UI. Click on the
Expand Down
37 changes: 37 additions & 0 deletions hack/release-gen-download-section.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
# Requires `skopeo` and `jq` to be installed.

set -e

sk_digest() {
skopeo inspect "docker://${1}" | jq -r .Digest
}

image_info() {
curr_img="quay.io/samba.org/${1}:${2}"
digest=$(sk_digest "${curr_img}")
# strip preN from tag name
final_tag=${2/%pre[0-9]*/}
tag_img="quay.io/samba.org/${1}:${final_tag}"
dst_img="quay.io/samba.org/${1}@${digest}"

echo "### $1"
echo "* By tag: $tag_img"
echo "* By digest: $dst_img"
echo ""
}

wip_tag=$1
if [ -z "${wip_tag}" ] ; then
echo "No tag provided!" >&2
exit 1
fi

echo "## Downloads"
echo ""
echo "Images built for this release can be acquired from the quay.io image registry."
echo ""
for component in samba-server samba-ad-server samba-client samba-toolbox; do
image_info "${component}" "${wip_tag}"
done

Loading