Skip to content

Commit dc1e1e5

Browse files
committed
azure-pipelines-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 <[email protected]>
1 parent 53f251a commit dc1e1e5

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

azure-pipelines-rpi.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ pr:
99
- rpi-6.6.y
1010
- rpi-6.12.y
1111

12+
resources:
13+
repositories:
14+
- repository: wiki-scripts
15+
type: github
16+
name: analogdevicesinc/wiki-scripts
17+
endpoint: analogdevicesinc
18+
1219
stages:
1320
- stage: Builds
1421
jobs:
@@ -119,3 +126,24 @@ stages:
119126
ARTIFACTORY_PATH: $(PATH)
120127
ARTIFACTORY_TOKEN: $(TOKEN)
121128
displayName: "Push to Artifactory"
129+
130+
- job: Push_to_Cloudsmith
131+
condition: succeeded()
132+
pool:
133+
name: Default
134+
demands:
135+
- agent.name -equals linux-rpi
136+
steps:
137+
- checkout: self
138+
fetchDepth: 1
139+
clean: true
140+
- checkout: wiki-scripts
141+
fetchDepth: 1
142+
clean: true
143+
- task: DownloadPipelineArtifact@2
144+
inputs:
145+
path: $(Build.SourcesDirectory)/bin
146+
- bash: $(Build.SourcesDirectory)/linux/ci/travis/prepare_artifacts_rpi.sh cloudsmith
147+
env:
148+
CLOUDSMITH_API_KEY: $(CLOUDSMITH_API_KEY)
149+
displayName: "Push to Cloudsmith"

ci/travis/prepare_artifacts_rpi.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,24 @@ 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+
python3 ${BUILD_SOURCESDIRECTORY}/wiki-scripts/utils/cloudsmith_utils/upload_to_cloudsmith.py \
132+
--repo="sdg-linux-rpi" \
133+
--version="linux_rpi/${BUILD_SOURCEBRANCHNAME}/${timestamp}/" \
134+
--local_path="${SOURCE_DIRECTORY}/${timestamp}" \
135+
--tags="git_sha-${GIT_SHA};timestamp_${timestamp}" \
136+
--token="${CLOUDSMITH_API_KEY}" \
137+
--log_file="upload_to_cloudsmith.log" \
138+
--no_rel_path
139+
}
140+
121141
artifacts_${1}

0 commit comments

Comments
 (0)