Skip to content

Commit 78327b7

Browse files
committed
ci: travis: prepare_artifacts_rpi: add cloudsmith upload support for rpi artifacts
Add function for cloudsmith support in the prepare_artifacts_rpi.sh script to upload the rpi artifacts. Signed-off-by: Andreea Andrisan <Andreea.Andrisan@analog.com>
1 parent 53f251a commit 78327b7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ci/travis/prepare_artifacts_rpi.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,25 @@ artifacts_swdownloads() {
118118
-i ${KEY_FILE} -r rpi_archives_properties.txt ${DEST_SERVER}/${BUILD_SOURCEBRANCHNAME}
119119
}
120120

121+
#upload artifacts to Cloudsmith
122+
artifacts_cloudsmith() {
123+
artifacts_structure
124+
cd ${SOURCE_DIRECTORY}/${timestamp}
125+
mv ./32bit/rpi_modules_32bit.tar.gz ./
126+
mv ./64bit/rpi_modules_64bit.tar.gz ./
127+
tar -C ${PWD}/32bit -czvf rpi_latest_boot_32bit.tar.gz .
128+
tar -C ${PWD}/64bit -czvf rpi_latest_boot_64bit.tar.gz .
129+
rm -r ./32bit
130+
rm -r ./64bit
131+
132+
python3 ${BUILD_SOURCESDIRECTORY}/wiki-scripts/utils/cloudsmith_utils/upload_to_cloudsmith.py \
133+
--repo="sdg-linux-rpi" \
134+
--version="linux_rpi/${BUILD_SOURCEBRANCHNAME}/${timestamp}/" \
135+
--local_path="${SOURCE_DIRECTORY}/${timestamp}" \
136+
--tags="git_sha-${GIT_SHA};timestamp_${timestamp}" \
137+
--token="${CLOUDSMITH_API_KEY}" \
138+
--log_file="upload_to_cloudsmith.log" \
139+
--no_rel_path
140+
}
141+
121142
artifacts_${1}

0 commit comments

Comments
 (0)