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 Open Project site CI deployments automatically on each software/spec repo update #40

Open
strogonoff opened this issue Sep 23, 2018 · 7 comments

Comments

@strogonoff
Copy link
Contributor

strogonoff commented Sep 23, 2018

Currently in OP framework, each project site during its build pulls the information about each descendant software package from that package’s GitHub repo (things like last commit timestamp, documentation, soon probably latest release & other things).

This keeps things more or less DRY, and maintainers don’t need to make commits to project sites each time any of its descendant software packages gets updated.

However, it is still preferable to build project sites when software gets updated so that sites show up-to-date commit timestamps, docs & all. While we do have the CI set up, without a commit in project site repo the site won’t get built.

I see two options:

  • Automatic way: As we use Travis CI now, it can be pretty straightforward to set up GitHub webhooks on software packages repos so that they ping Travis API for their respective project sites builds whenever a new commit lands for any given software. This way we’ll remove one of the few remaining cases where human participation is needed in Open Project site lifecycle.

  • Semi-automatic way: Let site maintainers trigger site builds via Travis dashboard (I don’t think I can do this currently).

Those options are not mutually exclusive, ideally both would be good. Also, in either case we might want to debounce build triggers to ensure they don’t queue up, unless Travis does that natively.

@strogonoff strogonoff changed the title Trigger Open Project site CI deployments semi-automatically or automatically Trigger Open Project site CI deployments automatically on each software/spec repo update Sep 28, 2018
@ronaldtse
Copy link
Contributor

@strogonoff could you help implement the first option first?

And in the deployment job of the OP site we can set Travis to debounce builds too.

@ronaldtse
Copy link
Contributor

@strogonoff
Copy link
Contributor Author

strogonoff commented Jan 6, 2019

@ronaldtse Doing a pilot of this on Metanorma site.

When available, could you please do the following:

  1. Run travis login && travis token
  2. In Travis settings for metanorma.com, create a variable TRAVIS_ACCESS_TOKEN containing the access token shown on previous step. According to how Travis works, variable contents would be visible only to you and won’t be included in logs
  3. Run Travis build to check for failures. (Open hub build should also get triggered)

@strogonoff
Copy link
Contributor Author

(For now to trigger the build we’re using a third-party script downloaded from GitHub each build, as suggested by some of the links posted by Ronald. If the pilot is successful we might/should switch to hosting the triggering code under our control to avoid unexpected surprises.)

@strogonoff
Copy link
Contributor Author

@ronaldtse Feel free to ignore this, apparently I have Travis dashboard access for metanorma.com!

strogonoff added a commit to metanorma/metanorma.org that referenced this issue Jan 9, 2019
@ronaldtse
Copy link
Contributor

Yay! Sorry I completely missed this issue... 😭

@strogonoff
Copy link
Contributor Author

strogonoff commented Jan 9, 2019

Current status:

  • Triggering build project site repo -> hub site repo
  • Triggering build software or spec repo -> project site and hub site repos
  • Avoiding relying on third-party triggering code for sanity & security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants