Skip to content

Commit

Permalink
Update release scripting for kbs-client
Browse files Browse the repository at this point in the history
The release script was not capturing kbs-client during the
release process, so this fixes the issue. A slight naming
change is also made to the GHA yaml's on-push to make it more
consistent with other packages. The release guide now reflects
the change as well.

Signed-off-by: Chris Porter <porter@ibm.com>
  • Loading branch information
portersrc authored and Xynnn007 committed Feb 5, 2025
1 parent 690f226 commit f107bc0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push-kbs-client-to-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: |
commit_sha=${{ github.sha }}
oras push \
ghcr.io/confidential-containers/staged-images/kbs-client:sample_only-${{ matrix.arch }}-linux-gnu-${commit_sha},latest-${{ matrix.arch }} \
ghcr.io/confidential-containers/staged-images/kbs-client:sample_only-${commit_sha}-${{ matrix.arch }},latest-${{ matrix.arch }} \
kbs-client
if [ "${{ matrix.arch }}" = "x86_64" ]; then
oras push ghcr.io/confidential-containers/staged-images/kbs-client:latest kbs-client
Expand Down
18 changes: 15 additions & 3 deletions hack/release-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@ declare -g release_tag
declare -A staged_to_release=(
["staged-images/kbs"]="key-broker-service"
["staged-images/kbs-grpc-as"]="key-broker-service"
["staged-images/kbs-client"]="kbs-client"
["staged-images/rvps"]="reference-value-provider-service"
["staged-images/coco-as-grpc"]="attestation-service"
["staged-images/coco-as-restful"]="attestation-service"
)
declare -A staged_to_release_tag_prefix=(
["staged-images/kbs"]="built-in-as-"
["staged-images/kbs-client"]="sample_only-"
["staged-images/coco-as-restful"]="rest-"
)
declare -A staged_to_staged_tag_prefix=(
["staged-images/kbs-client"]="sample_only-"
)

function usage_and_exit() {
echo
Expand Down Expand Up @@ -82,7 +87,14 @@ function tag_and_push_packages() {
for staged_pkg_name in ${!staged_to_release[@]}; do
release_pkg_name=${staged_to_release[${staged_pkg_name}]}

# set tag prefix (if needed)
# set staged tag prefix (if needed)
staged_tag_prefix=
if [[ -v staged_to_staged_tag_prefix[${staged_pkg_name}] ]]; then
staged_tag_prefix=${staged_to_staged_tag_prefix[${staged_pkg_name}]}
fi
staged_tag_full=${staged_tag_prefix}${release_candidate_sha}

# set release tag prefix (if needed)
release_tag_prefix=
if [[ -v staged_to_release_tag_prefix[${staged_pkg_name}] ]]; then
release_tag_prefix=${staged_to_release_tag_prefix[${staged_pkg_name}]}
Expand All @@ -91,10 +103,10 @@ function tag_and_push_packages() {

for arch in x86_64 s390x; do
# pull the staged package
docker pull ${ghcr_repo}/${staged_pkg_name}:${release_candidate_sha}-${arch}
docker pull ${ghcr_repo}/${staged_pkg_name}:${staged_tag_full}-${arch}

# tag it
docker tag ${ghcr_repo}/${staged_pkg_name}:${release_candidate_sha}-${arch} \
docker tag ${ghcr_repo}/${staged_pkg_name}:${staged_tag_full}-${arch} \
${ghcr_repo}/${release_pkg_name}:${release_tag_full}-${arch}

# push it (i.e. release it)
Expand Down
1 change: 1 addition & 0 deletions release-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ mappings:
```
staged-images/kbs:latest -> key-broker-service:built-in-as-v0.8.2
staged-images/kbs-grpc-as:latest -> key-broker-service:v0.8.2
staged-images/kbs-client:latest -> kbs-client:v0.8.2
staged-images/kbs-ita-as:latest -> key-broker-service:ita-as-v0.8.2
staged-images/rvps:latest -> reference-value-provider-service:v0.8.2
staged-images/coco-as-grpc:latest -> attestation-service:v0.8.2
Expand Down

0 comments on commit f107bc0

Please sign in to comment.