@@ -46,12 +46,17 @@ commands:
4646 no_output_timeout : 20m
4747 - run :
4848 name : Package
49- command : make -C opt pack SHOW=1
49+ command : |
50+ make -C opt pack SHOW=1
51+ (cd bin/artifacts; tar -cf snapshots-<<parameters.platform>>.tar snapshots/)
5052 - persist_to_workspace :
5153 root : bin/
5254 paths :
5355 - artifacts/*.zip
5456 - artifacts/*.tgz
57+ - artifacts/*.tar
58+ # - artifacts/shapshots/*.zip
59+ # - artifacts/shapshots/*.tgz
5560 - store_artifacts :
5661 path : test/logs
5762
@@ -71,16 +76,27 @@ commands:
7176 name : Build for platform
7277 command : |
7378 docker login -u redisfab -p $DOCKER_REDISFAB_PWD
74- cd opt/build/docker
79+ pushd opt/build/docker
7580 #@@ make build publish $(./version-params) CPU=1 OSNICK=<<parameters.platform>> X64=1 ARTIFACTS=1 TEST=1 VERBOSE=1
7681 make build publish $(./version-params) CPU=1 OSNICK=<<parameters.platform>> X64=1 ARTIFACTS=1 VERBOSE=1
7782 make build publish $(./version-params) GPU=1 OSNICK=<<parameters.platform>> X64=1 ARTIFACTS=1 VERBOSE=1
83+ popd > /dev/null
84+ logstar=bin/artifacts/tests-logs-cpu.tgz
85+ logsdir=tests/logs/cpu
86+ mkdir -p $logsdir
87+ if [[ -e $logstar ]]; then tar -C $logsdir -xzf $logstar; fi
88+ (cd bin/artifacts; tar -cf snapshots-<<parameters.platform>>.tar snapshots/)
7889 no_output_timeout : 40m
7990 - persist_to_workspace :
8091 root : bin/
8192 paths :
8293 - artifacts/*.zip
8394 - artifacts/*.tgz
95+ - artifacts/*.tar
96+ # - artifacts/shapshots/*.zip
97+ # - artifacts/shapshots/*.tgz
98+ - store_artifacts :
99+ path : test/logs
84100
85101 deploy-steps :
86102 parameters :
@@ -202,11 +218,11 @@ jobs:
202218 docker run --gpus all -v $HOME/tests:/build/test/logs -it --rm redisai-gpu:latest-x64-bionic-test
203219 no_output_timeout : 40m
204220 - store_artifacts :
205- path : tests
221+ path : test/log
206222
207223 deploy-artifacts :
208224 parameters :
209- package :
225+ location :
210226 type : string
211227 docker :
212228 - image : redisfab/rmbuilder:6.0.5-x64-buster
@@ -216,8 +232,42 @@ jobs:
216232 - run :
217233 name : Deploy to S3
218234 command : |
219- cd workspace
220- aws s3 cp artifacts/ s3://redismodules/$PACKAGE_NAME/ --acl public-read --recursive --exclude "*" --include "*.zip" --include "*.tgz"
235+ cd "workspace/artifacts/<<parameters.location>>"
236+ for f in *.zip snapshot/*.tgz; do
237+ aws s3 cp $f s3://redismodules/$PACKAGE_NAME/<<parameters.location>>/ --acl public-read
238+ done
239+
240+ deploy-snapshot :
241+ docker :
242+ - image : redisfab/rmbuilder:6.0.5-x64-buster
243+ steps :
244+ - attach_workspace :
245+ at : workspace
246+ - run :
247+ name : Deploy Snapshots to S3
248+ command : |
249+ cd workspace/artifacts
250+ for f in snapshots-*.tar; do
251+ tar xf $f
252+ done
253+ cd snapshots
254+ for f in *.zip *.tgz; do
255+ aws s3 cp --no-progress $f s3://redismodules/$PACKAGE_NAME/snapshots/ --acl public-read
256+ done
257+
258+ deploy-release :
259+ docker :
260+ - image : redisfab/rmbuilder:6.0.5-x64-buster
261+ steps :
262+ - attach_workspace :
263+ at : workspace
264+ - run :
265+ name : Deploy Releases to S3
266+ command : |
267+ cd workspace/artifacts
268+ for f in *.zip *.tgz; do
269+ aws s3 cp --no-progress $f s3://redismodules/$PACKAGE_NAME/ --acl public-read
270+ done
221271
222272
223273on-any-branch : &on-any-branch
@@ -296,14 +346,10 @@ workflows:
296346 - build-multiarch-docker :
297347 << : *never # temporarily disabled
298348 # <<: *on-version-tags
299- - deploy-artifacts :
300- name : deploy-branch
301- package : branch
349+ - deploy-snapshot :
302350 << : *after-platform-builds
303- << : *on-any-branch
304- - deploy-artifacts :
305- name : deploy-release
306- package : release
351+ << : *on-master
352+ - deploy-release :
307353 << : *after-platform-builds
308354 << : *on-version-tags
309355
0 commit comments