weekly #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: weekly | |
on: | |
schedule: | |
# this script will run each Friday at 10:10 UTC | |
- cron: "10 10 * * 5" | |
jobs: | |
dep-report: | |
runs-on: ubuntu-latest | |
container: | |
image: diem/build_environment:latest | |
env: | |
MESSAGE_PAYLOAD_FILE: /tmp/message | |
steps: | |
- uses: actions/[email protected] | |
with: | |
# fetch full history | |
fetch-depth: 0 | |
- uses: ./.github/actions/build-setup | |
- name: Produce report | |
run: ./scripts/weekly-dep-report.sh ${GITHUB_REPOSITORY} latest | tee ${MESSAGE_PAYLOAD_FILE} | |
- name: "Send Message" | |
uses: ./.github/actions/slack-file | |
with: | |
payload-file: ${{ env.MESSAGE_PAYLOAD_FILE }} | |
webhook: ${{ secrets.WEBHOOK_DEPENDENCY_CHANGES }} | |
transaction-replay: | |
runs-on: ubuntu-latest-xl | |
container: | |
image: diem/build_environment:latest | |
volumes: | |
- "${{github.workspace}}:/opt/git/diem" | |
env: | |
MESSAGE_PAYLOAD_FILE: /tmp/message | |
ACCOUNT: ${{ secrets.TRANSACTION_REPLAY_ACCOUNT }} | |
CONTAINER: backup | |
SUB_DIR: e2 | |
SAS: "" | |
CONFIG: .github/workflows/transaction-replay.toml | |
steps: | |
- uses: actions/[email protected] | |
- uses: ./.github/actions/build-setup | |
- name: install azcopy | |
run: | | |
# Download AzCopy | |
curl -sL -o downloadazcopy-v10-linux "https://azcopyvnext.azureedge.net/release20210226/azcopy_linux_amd64_10.9.0.tar.gz" | |
# Expand Archive | |
tar -xvf downloadazcopy-v10-linux | |
# Move AzCopy to the destination you want to store it | |
cp ./azcopy_linux_amd64_*/azcopy /usr/bin/ | |
rm -rf downloadazcopy-v10-linux azcopy_linux_amd64_* | |
- name: replay transactions | |
run: | | |
cargo run --release --bin db-restore -- --concurrent-downloads 2 --target-db-dir /var/tmp/dbrestore/ auto --replay-all command-adapter --config "$CONFIG" | |
- uses: diem/actions/create-issue@faadd16607b77dfa2231a8f366883e01717b3225 | |
if: ${{ failure() }} | |
env: | |
JOB_URL: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
title: "DB restore in transaction replay failed" | |
body: "Found db-restore failure in job ${{ env.JOB_URL }}" | |
assignees: "msmouse" | |
labels: "storage" | |
- uses: ./.github/actions/build-teardown |