Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Updated 'upgrade requirements' workflow to use reusable workflows #85

Merged
merged 2 commits into from
Dec 8, 2021

Conversation

edx-requirements-bot
Copy link
Contributor

Additional information from script execution

Python code cleanup by the cleanup-python-code Jenkins job.

This pull request was generated by the cleanup-python-code Jenkins job, which ran
cd .github/workflows;  TEAM_REVIEWERS=$(grep 'team-reviewers=' upgrade-python-requirements.yml -m 1 | awk '{print $2}'); TEAM_REVIEWERS=${TEAM_REVIEWERS/--team-reviewers=/}; SCHEDULE=$(grep 'cron:' upgrade-python-requirements.yml -m 1 | sed 's/^.*: //');   EMAIL_TO=$(grep 'to:' upgrade-python-requirements.yml -m 1 | sed 's/^.*: //'); [ -z $(grep 'Send success notification' upgrade-python-requirements.yml) ] && SEND_SUCCESS_NOTIFICATION=$(echo false) || SEND_SUCCESS_NOTIFICATION=$(echo true); : > upgrade-python-requirements.yml; printf "name: Upgrade Requirements\n\non:\n  schedule:\n     - cron: ${SCHEDULE}\n  workflow_dispatch:\n     inputs:\n       branch:\n         description: 'Target branch to create requirements PR against'\n         required: true\n         default: \$default-branch\njobs:\n   call-upgrade-python-requirements-workflow:\n    with:\n       branch: \${{ github.event.inputs.branch }}\n       team_reviewers: ${TEAM_REVIEWERS}\n       email_address: ${EMAIL_TO}\n       send_success_notification: ${SEND_SUCCESS_NOTIFICATION}\n    secrets:\n       requirements_bot_github_token: \${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}\n       requirements_bot_github_email: \${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}\n       edx_smtp_username: \${{ secrets.EDX_SMTP_USERNAME }}\n       edx_smtp_password: \${{ secrets.EDX_SMTP_PASSWORD }}\n    uses: edx/.github/.github/workflows/upgrade-python-requirements.yml@master\n" >> upgrade-python-requirements.yml;

The following packages were installed:
``

@Jawayria Jawayria requested a review from a team November 29, 2021 12:57
branch:
description: 'Target branch to create requirements PR against'
required: true
default: $default-branch
Copy link
Contributor

@matthugs matthugs Nov 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jawayria this will not work. $default-branch is a template feature, not syntax which gets interpolated in general workflow files.
Screen Shot 2021-11-30 at 4 38 42 PM
Screen Shot 2021-11-30 at 4 40 31 PM

from https://github.com/edx/super-csv/runs/4373685050?check_suite_focus=true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matthugs Thanks so much for pointing it out. I tested this workflow in some repos before running cleanup job in bulk but this issue didn't come up as we set branch name to 'master' here if input is empty and most of the repos had 'master' as default branch.
I've started propagating this correction in other repos as well.

@matthugs matthugs force-pushed the jenkins/reusable-workflow-23faf88 branch from 75b0ec2 to 1502636 Compare December 8, 2021 19:50
@matthugs matthugs force-pushed the jenkins/reusable-workflow-23faf88 branch from 678c6b2 to 2f7093f Compare December 8, 2021 20:04
@matthugs matthugs merged commit 63c528d into master Dec 8, 2021
@matthugs matthugs deleted the jenkins/reusable-workflow-23faf88 branch December 8, 2021 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants