Skip to content
Snippets Groups Projects
Commit cb7b991d authored by Matt Hughes's avatar Matt Hughes
Browse files

chore: update requirements upgrade automation

parent c41245e4
No related branches found
No related tags found
No related merge requests found
name: Upgrade Requirements name: Upgrade Python Requirements
on: on:
schedule: schedule:
# will start the job at 02:30 UTC every Friday - cron: "15 15 8/14 * *"
- cron: "30 2 * * 5"
workflow_dispatch: workflow_dispatch:
inputs: inputs:
branch: branch:
description: "Target branch to create requirements PR against" description: "Target branch against which to create requirements PR"
required: true required: true
default: 'master' default: 'master'
jobs: jobs:
upgrade_requirements: call-upgrade-python-requirements-workflow:
runs-on: ubuntu-20.04 uses: edx/.github/.github/workflows/upgrade-python-requirements.yml@master
with:
strategy: branch: ${{ github.event.inputs.branch || 'master' }}
matrix: # optional parameters below; fill in if you'd like github or email notifications
python-version: ["3.8"] # user_reviewers: ""
# team_reviewers: ""
steps: email_address: "masters-requirements-update@2u-internal.opsgenie.net"
- name: setup target branch send_success_notification: true
run: echo "target_branch=$(if ['${{ github.event.inputs.branch }}' = '']; then echo 'master'; else echo '${{ github.event.inputs.branch }}'; fi)" >> $GITHUB_ENV secrets:
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
- uses: actions/checkout@v1 requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
with: edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }}
ref: ${{ env.target_branch }} edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }}
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: make upgrade
run: |
cd $GITHUB_WORKSPACE
make upgrade
- name: setup testeng-ci
run: |
git clone https://github.com/edx/testeng-ci.git
cd $GITHUB_WORKSPACE/testeng-ci
pip install -r requirements/base.txt
- name: create pull request
env:
GITHUB_TOKEN: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
GITHUB_USER_EMAIL: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
run: |
cd $GITHUB_WORKSPACE/testeng-ci
python -m jenkins.pull_request_creator --repo-root=$GITHUB_WORKSPACE \
--target-branch="${{ env.target_branch }}" --base-branch-name="upgrade-python-requirements" \
--commit-message="chore: Updating Python Requirements" --pr-title="Python Requirements Update" \
--pr-body="Python requirements update.Please review the [changelogs](https://openedx.atlassian.net/wiki/spaces/TE/pages/1001521320/Python+Package+Changelogs) for the upgraded packages." \
--user-reviewers="" --team-reviewers="" --delete-old-pull-requests
...@@ -8,7 +8,7 @@ click==8.0.3 ...@@ -8,7 +8,7 @@ click==8.0.3
# via pip-tools # via pip-tools
pep517==0.12.0 pep517==0.12.0
# via pip-tools # via pip-tools
pip-tools==6.4.0 pip-tools==6.5.0
# via -r requirements/pip_tools.in # via -r requirements/pip_tools.in
tomli==2.0.0 tomli==2.0.0
# via pep517 # via pep517
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment