artem-zinnatullin / TheContext-Podcast

Podcast about Android Development with Hannes Dorfmann, Artem Zinnatullin, Artur Dryomov and wonderful guests!
Apache License 2.0
624 stars 17 forks source link

Make RSS feed validation part of CI #63

Open artem-zinnatullin opened 7 years ago

artem-zinnatullin commented 7 years ago

Currently we don't have any CI for the project, but we should since we do everything through GitHub PRs.

As a first CI step we can add rss feed xml validation as suggested here https://github.com/artem-zinnatullin/TheContext-Podcast/pull/61#issuecomment-293282196

sockeqwe commented 7 years ago

It would be super awesome to have a ci that not only validates rss feed, but would automate all the things.

Something like:

  1. i make a new branch, i.e with name Episode10, containing just the show nodes markdown file and push this branch on github.
  2. CI kicks in and validates show nodes, then generates:
    • rss feed.xml
    • update README
    • create milestone
    • create issue for discussion
    • validate all generated files
    • long term goal: auto editing of recorded files
  3. Create new branch from Epsiode 10 branch and commit and push all CI generated branches back and creates a pull request.
  4. Accept pull request and delete branch or reject pull request and start whole process again by with editing shownodes markdown file which the triggers ci and so on :)

Maybe instead of mark down shownodes we could trigger step 1 by writing a tiny dsl (which basically represents shownodes) in kotlin and commit and push this dsl file instead of shownodes markdown file...

Just some random ideas...

Artem Zinnatullin :slowpoke: notifications@github.com schrieb am Di., 11. Apr. 2017, 16:45:

Currently we don't have any CI for the project, but we should since we do everything through GitHub PRs.

As a first CI step we can add rss feed xml validation as suggested here #61 (comment) https://github.com/artem-zinnatullin/TheContext-Podcast/pull/61#issuecomment-293282196

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/artem-zinnatullin/TheContext-Podcast/issues/63, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnrgCxQ0ylMtavXuQzhqeAOM903D7Gks5ru5IWgaJpZM4M6M9- .

sockeqwe commented 7 years ago

So I have played around with the idea of auto generating and validating stuff for podcast here: https://github.com/sockeqwe/gitpodcaster

@artem-zinnatullin do you think this is going in the right direction and we should investigate further on this approach? Summary: idea is to define episodes as kotlin classes in a typesafe manner incl. show notes (as markdown). Workflow is currently the following:

  1. Record new episode
  2. Create new branch for new episode (forked from master)
  3. Create kotlin file for new episode with all episode data (guest, show notes, etc.). Commit and push this new file.
  4. Create pull request
  5. CI (travis) kicks in and evaluates file and generates feed.rss and shownotes.md and updates readme.md file. Travis will push those changes (generated files) back to same pull request branch, so that the auto generated / updated stuff can be reviewed as part of the pull requeat review.
  6. Other cohost reviews pull request (after CI completed) and merges into master (which means publishing) or requests changes.

Advantages of this approach:

Disadvantages:

While I really would like to automate all this things and integrate it with the git flow / pull request / review , I'm not sure if the current prototype implementation is going in the right direction. Unfortunately, I can't think of a better implementation right now. Any thoughts / ideas?

artem-zinnatullin commented 7 years ago

Sorry that it took me so long to answer, here is the feedback:

I've cloned the repo and reviewed code, in general, I like the implementation, especially knowing our hugest constraint — podcast hosting as a git repo on GitHub.

I was mostly thinking about one thing — commiting autogenerated files into the repo, which is usually a wrong thing to do.

So I was looking into ways to migrate hosting of our rss feed files to some real hosting but since we can't change GitHub response for a particular file to a 301 HTTP redirect we only can automatically migrate iTunes listeners (and those who use apps that implement iTunes new-feed-url directive).

So knowing all that I think your implementation is good enough (we'll do some PRs haha) and should be used for new episodes! 🎉

sockeqwe commented 7 years ago

commiting autogenerated files into the repo, which is usually a wrong thing to do.

Agreed, this feels wrong. Maybe we should use master branch to only "host" generated files and a "develop" branch where we commit our episode kotlin files. Then we deploy this to master. However, not sure how this could work exactly with pull request or to be more precise: when do we generate files? After the pull requst has accepted and merged to develop? So workflow like this:

  1. Create branch episodeXY (fork from develop branch)
  2. Create kotlin file for episodeXY, commit and create pull request for episodeXY. Target branch of pull request is develop.
  3. Our tool validates kotlin file for episodeXY, but doesn't generate files
  4. After reviewing and validation, pull request get merged on "develop" branch
  5. Our tool listens for commits on develop branch and generates files from it which then will be pushed to master branch
artem-zinnatullin commented 7 years ago

Another option is to use this git repo as production deployed by git pushes with full history of what was deployed and another repo for just Kotlin source files.

So whenever we put a tag in another repo it launches CI that deploys generated files to this repo!

sockeqwe commented 7 years ago

Sounds like a good idea!

Artem Zinnatullin :slowpoke: notifications@github.com schrieb am Sa., 10. Juni 2017, 15:42:

Another option is to use this git repo as production deployed by git pushes with full history of what was deployed and another repo for just Kotlin source files.

So whenever we put a tag in another repo it launches CI that deploys generated files to this repo!

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/artem-zinnatullin/TheContext-Podcast/issues/63#issuecomment-307565862, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnrv-rilhdOAdh9zJcH-1CJlejuja4ks5sCp08gaJpZM4M6M9- .