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

Trigger builds/uploads on github actions #7

Merged
merged 15 commits into from
Mar 5, 2017

Conversation

marmarek
Copy link
Member

Implements:

  1. Write a script to build a package when proper signed version tag is pushed  qubes-issues#1818 - final part - plugging into github web hook
  2. Transparent mechanism for migrating packages from current-testing to current qubes-issues#2573 - receive comments, verify signature and call appropriate "make update-repo-current"

Depends on QubesOS/qubes-builder#15

Comments in affected issues are only about 'stable' and 'testing'
uploads (which makes sense). But tracking packages in issues dedicated
for package tracking should be more detailed - which include
'security-testing' uploads.

QubesOS/qubes-issues#2573
1. Trigger build process when appropriately signed version tag is
pushed.
2. Trigger moving packages from testing to stable when appropriately
signed comment is created in an issue (in theory, any issue, but in
practice it's most convenient to comment in issues tracking particular
package).

Fixes QubesOS/qubes-issues#2573
This will avoid confusion about handling '$' and other shell special
characters. Pass needed variables using -v to awk.

Suggested by @woju
QubesOS/qubes-issues#2573
In theory white characters will be rejected anyway a moment later -
while checking for directory existence. But to be on a safe side, make
it explicit earlier.

Suggested by @woju
QubesOS/qubes-issues#2573
Have it besides other context-less checks.

Suggested by @woju
QubesOS/qubes-issues#2573
Shell command 'echo' may consume some parameters, for example '-e' or
'-n'. While it shouldn't happen here right now, make sure it will not
hurt anyway.

Suggested by @woju
QubesOS/qubes-issues#2573
@marmarek
Copy link
Member Author

Applied changes suggested by @woju

comment_body = obj['comment']['body']
# skip comment not having signed part at all
if '-----BEGIN PGP SIGNED MESSAGE-----' not in comment_body:
return

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

(yes yes... i see the verification down in qubesbuilder.ProcessGithubCommand)

Copy link
Member Author

Choose a reason for hiding this comment

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

It was really tempting to put this xkcd in a comment here ;)

Wrap actual code under "if __name__ == '__main__'". Also fix print
syntax.
This allows having one dispatcher script calling appropriate function,
instead of starting new process each time.

QubesOS/qubes-issues#2573
qubesbuilder.TriggerBuild do not allow '/' in input argument. Better
strip repository owner name in hook script, than weaken check in qrexec
service running in build VM. In case of ambiguity, some builder
instances will notice that nothing new is there to build.

QubesOS/qubes-issues#2573
@marmarek marmarek merged commit 5138ee3 into QubesOS:master Mar 5, 2017
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.

2 participants