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

Run bugzilla automation script on github actions #700

Merged
merged 1 commit into from May 26, 2020
Merged

Conversation

fao89
Copy link
Member

@fao89 fao89 commented Mar 23, 2020


if __name__ == '__main__':
send_html_email(
"dkliban@redhat.com, ttereshc@redhat.com, rchan@redhat.com",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"dkliban@redhat.com, ttereshc@redhat.com, rchan@redhat.com",
["dkliban@redhat.com", "ttereshc@redhat.com", "rchan@redhat.com"],

if __name__ == '__main__':
send_html_email(
"dkliban@redhat.com, ttereshc@redhat.com, rchan@redhat.com",
"Pulp CI job failed",
Copy link
Member

Choose a reason for hiding this comment

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

This is the text based message, text only with \n allowed

send_html_email(
"dkliban@redhat.com, ttereshc@redhat.com, rchan@redhat.com",
"Pulp CI job failed",
"Pulp CI job failed - https://github.com/pulp/pulp-ci/actions",
Copy link
Member

Choose a reason for hiding this comment

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

this allows html tags

Suggested change
"Pulp CI job failed - https://github.com/pulp/pulp-ci/actions",
"<h1>Pulp CI job failed</h1> - https://github.com/pulp/pulp-ci/actions",

@fao89
Copy link
Member Author

fao89 commented Mar 26, 2020

Thank you @rochacbruno

python-version: '3.7'
- name: Bugzilla automation script
env:
REDMINE_BUGZILLA_CONF: ${{ secrets.REDMINE_BUGZILLA_CONF }}
Copy link
Member Author

Choose a reason for hiding this comment

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

Need secret!

Copy link
Contributor

Choose a reason for hiding this comment

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

What format does this need to be in?

Copy link
Member Author

@fao89 fao89 May 18, 2020

Choose a reason for hiding this comment

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

INI format:

The Redmine and Bugzilla credentials are expected from to be read from a
file in ini format. See the example below. The location of this file is set
by the REDMINE_BUGZILLA_CONF environment variable.
For example `export REDMINE_BUGZILLA_CONF=~/Documents/redmine_bugzilla.ini`
<SNIP>
[bugzilla]
username = XXXX
password = XXXX
[redmine]
key = XXXX
</SNIP>

https://github.com/pulp/pulp-ci/blob/master/ci/redmine_bugzilla.py#L25-L38

Copy link
Contributor

Choose a reason for hiding this comment

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

The secret for the redmine key is REDMINE_API_KEY and it'll be BUGZILLA_USERNAME and BUGZILLA_PASSWORD for the bz credentials.

Copy link
Contributor

Choose a reason for hiding this comment

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

So I've set BUGZILLA_API_KEY as a secret on this repo. They're disabling use of username+password in favor of api keys. You should be able to do this:

RHBugzilla(f"{BUGZILLA_URL}/xmlrpc.cgi", api_key=api_key)

@daviddavis daviddavis merged commit 344a2cc into pulp:master May 26, 2020
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.

None yet

3 participants