Skip to content

Commit

Permalink
Include docker push release logs in Cloud Build (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIsCoding authored Mar 11, 2024
1 parent 0574d4a commit 7ae0549
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integration_test/cloudbuild-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ timeout: 3000s

substitutions:
_IMAGEPROJECT: 'cloud-healthcare-containers'
_CLOUD_SDK_IMAGE: 'google/cloud-sdk:467.0.0'
_CLOUD_SDK_IMAGE: 'google/cloud-sdk:290.0.0'
_PUBLISH: 'false'

availableSecrets:
Expand Down
6 changes: 5 additions & 1 deletion integration_test/scripts/publish-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ base_name="gcr.io/${1}/healthcare-api-dicom-dicomweb-adapter-"

publish_adapter () {
adapter_name=${base_name}${1}
docker push $adapter_name > /dev/null 2> /dev/null
docker push $adapter_name > /tmp/docker-pub-stdout.txt 2> /tmp/docker-pub-stderr.txt
echo "https://${adapter_name}:${2}"
}
if [ "$2" == "true" ]
Expand All @@ -30,7 +30,11 @@ then
version=`docker images | grep $base_name | awk '{print $2}' | grep "\." | head -n 1`
version=${version[0]}
import=$(publish_adapter import $version)
cat /tmp/docker-pub-stdout.txt
cat /tmp/docker-pub-stderr.txt
export=$(publish_adapter export $version)
cat /tmp/docker-pub-stdout.txt
cat /tmp/docker-pub-stderr.txt
body="$import\n$export"
echo {\"tag_name\": \"$version\",\"name\": \"$version\",\"body\": \"$body\"} > /workspace/request.json
responseCode=$(curl -# -XPOST -H "Authorization: Bearer $GH_TOKEN" -H 'Content-Type:application/json' -H 'Accept:application/json' -w "%{http_code}" --data-binary @/workspace/request.json \
Expand Down

0 comments on commit 7ae0549

Please sign in to comment.