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

GitHub / CI Integration #256

Open
NaoPross opened this issue May 1, 2020 · 4 comments
Open

GitHub / CI Integration #256

NaoPross opened this issue May 1, 2020 · 4 comments

Comments

@NaoPross
Copy link

NaoPross commented May 1, 2020

I know it's not very active at the moment but it would be nice if those summaries hosted under the HSRStud organization could get automatically posted on studentenportal.ch through the Github's API.

I've seen that some repositories already have a CI with Travis (may need to be fixed a little), so it would make sense to have it connected to the studentenportal to always get the latest build (or maybe list all releases?). And the GH repos could have a button that points to the issue tracker to allow those who don't LaTeX to ask for corrections.

@dbrgn
Copy link
Member

dbrgn commented May 1, 2020

Building the LaTeX summaries in GitHub workflows would be nice 🙂 And yep, maybe the Studentenportal could add "auto-updateable" summaries that point to a GitHub issue.

However, authentication/authorization could be tricky.

Another option could be a pull-based approach where GitHub workflows generate PDF releases and the Studentenportal pulls those.

@fabianhauser fabianhauser changed the title Integrate HSRStud Org repos with Github REST API GitHub / CI Integration May 1, 2020
@The-Compiler
Copy link
Member

There's also some previous discussion about this here: #66 (comment)

@NaoPross
Copy link
Author

NaoPross commented May 2, 2020

From #66 :

Wie schon erwähnt wurde, wird da https://github.com/HSR-Stud/ eingesetzt. Oft werden gar keine PDFs angeboten, sondern nur die TeX-Sourcen - dies ist aber teilweise für Studierende etwas problematisch, da z.B. auch noch Git-Submodule verwendet werden, was halt ein Fallstrick mehr ist.

Yeah exactly, though atm I'm dedicating a bit of my free time to fix it with a LaTeX package and CI to simplify that messy (and newbie hostile) workflow.

Grundsätzlich ists so, dass Studierende über viele Jahrgänge hinweg kollaborativ an diesen Zusammenfassungen arbeiten, womit "lädt doch von Hand ein PDF ins Studentenportal hoch" halt nicht umbedingt gut funktioniert.

Was ich sehr cool finden würde ist eine Integration mit Travis CI - heisst konkret:

  • Jemand pusht in einem der Repos einen neuen Tag
  • Travis CI baut ein PDF
  • Travis CI lädt das PDF als GitHub-Release hoch (oder ggf. ins Studentenportal?)
  • Das Studentenportal kriegt davon Bescheid (via Travis, oder GitHub-Webhook, oder polling, oder sowas)
  • Das Studentenportal macht automatisch einen neuen Eintrag (oder aktualisiert einen bestehenden) für das Dokument

This is pretty much exactly what I'd want.

@NaoPross
Copy link
Author

NaoPross commented May 3, 2020

However, authentication/authorization could be tricky.

I'll leave another quick note for the future impl: Travis can deploy stuff using a custom script, which in terms would make the auth very easy since one can code whatever he wants as long as it runs on the CI VM.

https://docs.travis-ci.com/user/deployment/script

It would be easy as adding the following to .travis.yml with a copy of the script:

deploy:
  provider: script
  script: python3 .travis/studentenportal/update.py
  on:
    tags: true

or even: Travis could fetch the latest version on its own (using git) during the build process.

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

4 participants