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

Autobuild CLI binary #5

Closed
naorlivne opened this issue Oct 1, 2017 · 6 comments
Closed

Autobuild CLI binary #5

naorlivne opened this issue Oct 1, 2017 · 6 comments

Comments

@naorlivne
Copy link
Member

There should be a full CI\CD (TravisCI based most likely) that autobuilds the CLI binary and pushes it to the github repo whenever an update is made to it.

@jakobpederson
Copy link
Contributor

I was attempting this and had some questions. I've got a .travis.yml file and had a placeholder tests.py file set up, but I don't understand the "autobuilds the CLI binary and pushes it to the github repo", because at the moment it seems like travis only triggers on a PR, not an update. Is the goal to have it trigger a PR anytime a push is made?

@naorlivne
Copy link
Member Author

naorlivne commented Oct 21, 2018

Hi @jakobpederson

First let me thank you for stepping up and helping with this issue.

My thought process when opening this issue was that currently deploying a new version is a matter of me having to manually run pyinstaller -F nebulactl.py inside the repo root folder to create the nebulactl binary in the dist/ folder, being a binary we can't have any contributor build it himself for every contribution for security reasons (& besides I'm pro automation) so I wanted to leverage Travis to automate that step.

As to what way Travis will push the binary back to GitHub is something I leave open for the contributor (in this case you) to decide on, it can be either a script which runs a git push, it can open another PR with the latest version binary or it can also be something like using Travis built in deployment release - https://docs.travis-ci.com/user/deployment/releases/ - just about everything will be better then the current manual build\push way of deploying a new binary.

It may very well be that Travis will need to be reconfigured to trigger on updates rather then just PR in order to achieve that, if you come anything where you require changes on Travis that are outside the scope of it's .travis.yml feel free to drop me a line with what changes are needed.

Having a place holder for running unit\smoke tests in place is also a good idea, I had a look at your PR before closing it & it seems like a great start & If you feel like reopening it & changing the python version to "2.7" (which is what nebula is built on) I see no reason not to merge it as is as the first step in resolving this ticket.

EDIT:
https://blog.fossasia.org/push-your-apk-to-your-github-repository-from-travis/ - seems like a good way of doing it as it both solves the loop that would be caused by having Travis push to git thus triggering another Travis run & it's rather simple to implement in a fully automatic way... the blog post is about pushing APK so obviously some changes will be needed but the idea behind it holds true.

More info about having Travis skip the CI of a push can be found at https://docs.travis-ci.com/user/customizing-the-build/#skipping-a-build

@jakobpederson
Copy link
Contributor

Hey @naorlivne,

Thanks for getting back to me! I really appreciate these links. I'll give it a shot and see if I can get something working.

Thanks!
Jake

This was referenced Nov 17, 2018
@naorlivne
Copy link
Member Author

Hi @jakobpederson - not sure if you got stuck at this task or forget or just busy but wanted to let you know I changed the unittest their own folder & that travis now also starts a Nebula manager to run future tests against as part of the CI tests.

@jakobpederson
Copy link
Contributor

jakobpederson commented Jan 17, 2019 via email

@naorlivne
Copy link
Member Author

No need to apologize, being busy & distracted is my usual state so I get it.

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