build!: Remove unused github action and sql file.

This automation has been making these PRs to update this file but no one
has been merging them and it doesn't look like the sql file is being
used by devstack.

BREAKING CHANGE: This removes the edxapp.sql file and a regularly
running github action.  If you are relying on that file, this commit
will break you.  My search didn't turn up anything that would be using
this file but I might have missed something.
This commit is contained in:
Feanil Patel
2021-11-03 14:59:01 -04:00
parent b8d49e77cc
commit 4dd0b88e98
3 changed files with 0 additions and 13703 deletions

View File

@@ -1,23 +0,0 @@
name: mysqldbdump
on:
schedule:
- cron: '0 8 * * *'
jobs:
mysqldbdump:
name: mysqldbdump
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Migrate
run: docker-compose -f ./.github/workflows/docker-compose.yml.mysqldbdump up -d
- name: Wait for migration to complete
uses: jakejarvis/wait-action@master
with:
time: '900s'
- name: Dump database
run: docker exec -i edx.devstack.mysql57 mysqldump -u'edxapp001' -p'password' --skip-dump-date edxapp > edxapp.sql
- name: Commit dump file to repo.
run: ./.github/workflows/mysqldbdump_pr.sh
env:
GH_ACCESS_TOKEN: ${{ secrets.EDX_DEPLOYMENT_GH_TOKEN }}

View File

@@ -1,39 +0,0 @@
#! /usr/bin/env bash
export GITHUB_USER='edx-deployment'
export GITHUB_TOKEN=$GH_ACCESS_TOKEN
export GITHUB_EMAIL='edx-deployment@edx.org'
export REPO_NAME='edx-platform'
export DB_NAME='edxapp'
cd ..
# install hub
curl -L -o hub.tgz https://github.com/github/hub/releases/download/v2.14.2/hub-linux-amd64-2.14.2.tgz
tar -zxvf hub.tgz
cd "$REPO_NAME"
if [[ -z $(git status -s) ]]; then
echo "No changes to commit."
else
git config --global user.name "${GITHUB_USER}"
git config --global user.email "${GITHUB_EMAIL}"
obsolete_dump_prs=`../hub-linux*/bin/hub pr list -s open --format '%I:%H %n' | grep 'github-actions-mysqldbdump'`
if [[ ! -z $obsolete_dump_prs ]]; then
for pr in $obsolete_dump_prs; do
IFS=':' read pr_num branch <<< "$pr"
../hub-linux*/bin/hub issue update ${pr_num} -s closed
../hub-linux*/bin/hub push origin --delete ${branch}
done
fi
git checkout -b github-actions-mysqldbdump/$GITHUB_SHA
git add "${DB_NAME}".sql
git commit -m "MySQLdbdump" --author "GitHub Actions MySQLdbdump automation <admin@edx.org>"
git push --set-upstream origin github-actions-mysqldbdump/$GITHUB_SHA
../hub-linux*/bin/hub pull-request -m "${DB_NAME} MySQL database dump" -m "MySQL database dump" -l mysqldbdump
fi

13641
edxapp.sql

File diff suppressed because one or more lines are too long