Merge pull request #3163 from BOINC/cb_tune_bintray

Deployment: run bintray cleanup script once a month
This commit is contained in:
Uplinger 2019-05-28 17:41:03 -05:00 committed by GitHub
commit bf7c3850f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -71,6 +71,7 @@ PKG_NAME="custom"
PKG_DESC="Automated CI build of BOINC components" PKG_DESC="Automated CI build of BOINC components"
VERSION="custom_${BUILD_DATE}_${GIT_REV}" VERSION="custom_${BUILD_DATE}_${GIT_REV}"
VERSION_DESC="Custom build created on ${BUILD_DATE}" VERSION_DESC="Custom build created on ${BUILD_DATE}"
RUN_CLEANUP="false"
if [[ $CI_RUN == "true" ]]; then if [[ $CI_RUN == "true" ]]; then
case $TRAVIS_EVENT_TYPE in case $TRAVIS_EVENT_TYPE in
pull_request) pull_request)
@ -83,6 +84,10 @@ if [[ $CI_RUN == "true" ]]; then
PKG_NAME="weekly" PKG_NAME="weekly"
VERSION="weekly_${BUILD_DATE}_${GIT_REV}" VERSION="weekly_${BUILD_DATE}_${GIT_REV}"
VERSION_DESC="Weekly CI build created on ${BUILD_DATE}" VERSION_DESC="Weekly CI build created on ${BUILD_DATE}"
# run cleanup script once a month
if [[ $(date +%d) -lt 8 ]]; then
RUN_CLEANUP="true"
fi
;; ;;
*) *)
echo "event $TRAVIS_EVENT_TYPE not supported for deployment" echo "event $TRAVIS_EVENT_TYPE not supported for deployment"
@ -139,3 +144,7 @@ if [ "$TRAVIS_BUILD_ID" ] ; then
set +x set +x
${CURL} -H Content-Type:application/json -X POST -d "${data}" "${API}/packages/${BINTRAY_REPO_OWNER}/${BINTRAY_REPO}/${PKG_NAME}/versions/${VERSION}/release_notes" ${CURL} -H Content-Type:application/json -X POST -d "${data}" "${API}/packages/${BINTRAY_REPO_OWNER}/${BINTRAY_REPO}/${PKG_NAME}/versions/${VERSION}/release_notes"
fi fi
if [[ $RUN_CLEANUP == "true" ]]; then
./deploy/cleanup_bintray.sh
fi