Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 89d0fdd

Browse files
craig[bot]rail
craig[bot]
andcommittedJan 20, 2025
139448: release: generate cloud-only metadata artifact r=rail a=rail Previously, we needed to crawl the build log in order to find the cloud-only build metadata, such as version and cloud-only release number. This PR adds a step to generate a metadata file with basic information. Fixes: RE-783 Release note: None Co-authored-by: Rail Aliiev <[email protected]>
2 parents 1aab60e + 82f7607 commit 89d0fdd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
 

‎build/teamcity/internal/release/process/build-cockroach-release-cloud-only.sh

+18
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,21 @@ if [ $error = 1 ]; then
9090
exit 1
9191
fi
9292
tc_end_block "Verify docker images"
93+
94+
tc_start_block "Metadata"
95+
timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
96+
metadata_file="artifacts/metadata.json"
97+
mkdir -p artifacts
98+
cat > "$metadata_file" << EOF
99+
{
100+
"sha": "$BUILD_VCS_NUMBER",
101+
"timestamp": "$timestamp",
102+
"tag": "$TC_BUILD_BRANCH",
103+
"version": "$version",
104+
"cloud_release": "$cloud_release",
105+
"image": "$manifest"
106+
}
107+
EOF
108+
# Run jq to pretty print and validate JSON
109+
jq . "$metadata_file"
110+
tc_end_block "Metadata"

0 commit comments

Comments
 (0)
Please sign in to comment.