Experimental second downloads server (#1188)

This commit is contained in:
Tim Wilkinson 2024-05-04 23:15:33 -07:00 committed by GitHub
parent 76e0333968
commit 72c78970aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 19 additions and 18 deletions

View File

@ -100,7 +100,7 @@ jobs:
command: tar -cjf ~/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} -C ${MY_WORKING_DIRECTORY}/${ARTIFACTS_DIR} . command: tar -cjf ~/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} -C ${MY_WORKING_DIRECTORY}/${ARTIFACTS_DIR} .
- run: - run:
name: Deploy Files name: Deploy Files
command: scp -o StrictHostKeyChecking=no ~/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} ${SSH_USER}@${SSH_HOST}:${TARGET_DIR} command: scp -P ${SSH_PORT} -o StrictHostKeyChecking=no ~/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} ${SSH_USER}@${SSH_HOST2}:${TARGET_DIR}
build_release: build_release:
resource_class: large resource_class: large
@ -155,7 +155,7 @@ jobs:
command: tar -cjf ~/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} -C ${MY_WORKING_DIRECTORY}/${ARTIFACTS_DIR} . command: tar -cjf ~/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} -C ${MY_WORKING_DIRECTORY}/${ARTIFACTS_DIR} .
- run: - run:
name: Deploy Files name: Deploy Files
command: scp -o StrictHostKeyChecking=no ~/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} ${SSH_USER}@${SSH_HOST}:${TARGET_DIR} command: scp -P ${SSH_PORT} -o StrictHostKeyChecking=no ~/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} ${SSH_USER}@${SSH_HOST2}:${TARGET_DIR}
check2build: check2build:
machine: machine:
@ -163,7 +163,7 @@ jobs:
steps: steps:
- run: - run:
name: Retrieve last build info and check name: Retrieve last build info and check
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c ' ~/needs2build.sh ${CIRCLE_PROJECT_USERNAME} ${CIRCLE_PROJECT_REPONAME} ${CIRCLE_BRANCH} ${CIRCLE_SHA1}'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c ' ~/needs2build.sh ${CIRCLE_PROJECT_USERNAME} ${CIRCLE_PROJECT_REPONAME} ${CIRCLE_BRANCH} ${CIRCLE_SHA1}'"
- run: - run:
name: Check2build failure (build not needed) name: Check2build failure (build not needed)
when: on_fail when: on_fail
@ -175,7 +175,7 @@ jobs:
steps: steps:
- run: - run:
name: Save last build info name: Save last build info
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c ' echo ${CIRCLE_SHA1} > ~/build_info/${CIRCLE_PROJECT_USERNAME}_${CIRCLE_PROJECT_REPONAME}_${CIRCLE_BRANCH}'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c ' echo ${CIRCLE_SHA1} > ~/build_info/${CIRCLE_PROJECT_USERNAME}_${CIRCLE_PROJECT_REPONAME}_${CIRCLE_BRANCH}'"
process_artifacts_nightly: process_artifacts_nightly:
machine: machine:
@ -183,19 +183,19 @@ jobs:
steps: steps:
- run: - run:
name: Untar Files name: Untar Files
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'tar -xjf ${TARGET_DIR}/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} -C ${TARGET_DIR}'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'tar -xjf ${TARGET_DIR}/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} -C ${TARGET_DIR}'"
- run: - run:
name: Empty nightly dir name: Empty nightly dir
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'rm -rf ${NIGHTLY_DIR}'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'rm -rf ${NIGHTLY_DIR}'"
- run: - run:
name: Create nightly dir name: Create nightly dir
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mkdir -p ${NIGHTLY_DIR}'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'mkdir -p ${NIGHTLY_DIR}'"
- run: - run:
name: Move targets name: Move targets
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mv ${TARGET_DIR}/targets ${NIGHTLY_DIR}'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'mv ${TARGET_DIR}/targets ${NIGHTLY_DIR}'"
- run: - run:
name: Move packages name: Move packages
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mv ${TARGET_DIR}/packages ${NIGHTLY_DIR}'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'mv ${TARGET_DIR}/packages ${NIGHTLY_DIR}'"
process_artifacts_release: process_artifacts_release:
machine: machine:
@ -203,7 +203,7 @@ jobs:
steps: steps:
- run: - run:
name: Untar Files name: Untar Files
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'tar -xjf ${TARGET_DIR}/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} -C ${TARGET_DIR}'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'tar -xjf ${TARGET_DIR}/${CIRCLE_BRANCH}_${ARTIFACTS_FILE} -C ${TARGET_DIR}'"
changelog_nightly: changelog_nightly:
machine: machine:
@ -211,10 +211,11 @@ jobs:
steps: steps:
- run: - run:
name: Generate changelog.md name: Generate changelog.md
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'docker run --rm -v ~/:/usr/local/src/your-app ferrarimarco/github-changelog-generator -u ${CIRCLE_PROJECT_USERNAME} -p ${CIRCLE_PROJECT_REPONAME} -t ${GITHUB_TOKEN}'" #command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'docker run --rm -v ~/:/usr/local/src/your-app ferrarimarco/github-changelog-generator -u ${CIRCLE_PROJECT_USERNAME} -p ${CIRCLE_PROJECT_REPONAME} -t ${GITHUB_TOKEN}'"
command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'github-changelog-generator -u ${CIRCLE_PROJECT_USERNAME} -p ${CIRCLE_PROJECT_REPONAME} -t ${GITHUB_TOKEN}'"
- run: - run:
name: Move changelog name: Move changelog
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mv ~/CHANGELOG.md ${NIGHTLY_DIR}'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'mv ~/CHANGELOG.md ${NIGHTLY_DIR}'"
readme_nightly: readme_nightly:
machine: machine:
@ -222,16 +223,16 @@ jobs:
steps: steps:
- run: - run:
name: Fetch README.md name: Fetch README.md
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'wget https://raw.githubusercontent.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}/README.md'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'wget https://raw.githubusercontent.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}/README.md'"
- run: - run:
name: Move README.md name: Move README.md
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mv ~/README.md ${NIGHTLY_DIR}/readme.md'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'mv ~/README.md ${NIGHTLY_DIR}/readme.md'"
- run: - run:
name: Fetch SUPPORTED_DEVICES.md name: Fetch SUPPORTED_DEVICES.md
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'wget https://raw.githubusercontent.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}/SUPPORTED_DEVICES.md'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'wget https://raw.githubusercontent.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}/SUPPORTED_DEVICES.md'"
- run: - run:
name: Move SUPPORTED_DEVICES.md name: Move SUPPORTED_DEVICES.md
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mv ~/SUPPORTED_DEVICES.md ${NIGHTLY_DIR}/SUPPORTED_DEVICES.md'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c 'mv ~/SUPPORTED_DEVICES.md ${NIGHTLY_DIR}/SUPPORTED_DEVICES.md'"
afs_collector: afs_collector:
machine: machine:
@ -239,7 +240,7 @@ jobs:
steps: steps:
- run: - run:
name: Run AFS collector name: Run AFS collector
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c '${DOWNLOADS_DOCROOT}/afs/misc/collect.py ${DOWNLOADS_DOCROOT} ${DOWNLOADS_DOCROOT}/afs/www'" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "sh -c '${DOWNLOADS_DOCROOT}/afs/misc/collect.py ${DOWNLOADS_DOCROOT} ${DOWNLOADS_DOCROOT}/afs/www'"
post_to_slack: post_to_slack:
machine: machine:
@ -247,7 +248,7 @@ jobs:
steps: steps:
- run: - run:
name: Post to Slack name: Post to Slack
command: ssh ${SSH_USER}@${SSH_HOST} "./post-nightly.sh $(printf '%(%Y%m%d)T')-$(echo ${CIRCLE_SHA1} | cut -c '-7')" command: ssh -p ${SSH_PORT} ${SSH_USER}@${SSH_HOST2} "./post-nightly.sh $(printf '%(%Y%m%d)T')-$(echo ${CIRCLE_SHA1} | cut -c '-7')"
no_action: no_action:
machine: machine: