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

Continuous Integration #24

Open
paulfantom opened this issue Jan 7, 2018 · 10 comments
Open

Continuous Integration #24

paulfantom opened this issue Jan 7, 2018 · 10 comments

Comments

@paulfantom
Copy link
Contributor

@donat-b I can start adding CI pipeline based on travis ci to run molecule tests before accepting PRs. However I need some answers first:

  1. Do you want CI?
  2. Is testing in docker ok for you?
  3. What is your approach to versioning? Do you want to automatically apply new version after successful merge? And what do you think about semver?

This would also need you to link your github account with travis (travis ci account creation) and configuring repository in travis (I can help with some screenshots).

Also since you are using molecule 2.x it will probably take me some time to set up proper CI pipeline with docker containers.

@donat-b
Copy link
Owner

donat-b commented Jan 8, 2018

  1. Yes, please.
  2. Docker is fine. I'm currently using molecule+vagrant for the same reason you had to downgrade molecule - it was already configured in other projects :)
  3. Semver looks good, we can use that. Not sure about the automatic approach though, how does it figure out if a change is compatible or not?

I have an account, I didn't touch travis in while though. But it should be fine.

@paulfantom
Copy link
Contributor Author

how does it figure out if a change is compatible or not?

I don't understand.

What I applied in other repositories works like this:
After merging PR it will increase patch number (last one) unless somewhere in last commit is text [feature] then it increases minor numer (middle one). Major number isn't changed in an automatic way.

I like combination of Molecule and Vargant however docker is faster and I didn't found any CI which could leverage vagrant in efficient way :(

@donat-b
Copy link
Owner

donat-b commented Jan 8, 2018

Oh, I see now.

I also didn't find any way to get vagrant working with CI.

@paulfantom
Copy link
Contributor Author

Here is a script doing auto-versioning: https://github.com/paulfantom/ansible-restic/blob/master/.travis/generatetag.sh
It is started only on master branch ("deploy" section in travis).

@donat-b
Copy link
Owner

donat-b commented Jan 9, 2018

By the way, would it be possible to keep vagrant configuration so I can keep testing features locally?
Or it would require too many changes that it wouldn't make sense to keep it around?

@paulfantom
Copy link
Contributor Author

I'll look into it

@paulfantom
Copy link
Contributor Author

I haven't found any simple option to run 2 or more molecule drivers. Also I found that molecule now has 2 vagrant modules and one (named "vagrant") is in alpha state (link), which is strange since in molecule 1.x it was the most commonly used driver.

As for testing locally, you just need to install docker CE, and some python packages and you're good to go. Just molecule test and voila. If something is wrong you can use molecule login to login into docker container and check what is going on.

From my experience tesing in docker greatly reduces test execution time when compared to vagrant. For example in different project I have a molecule/travis 3 dimensional test matrix (2 app versions, 3 ansible versions, 5 OSes, so it adds to 30 combinations) which completes everything in about 8 minutes (could be faster, but travis has it's limits) and one molecule test completes everything in 3 minutes (link).

@donat-b
Copy link
Owner

donat-b commented Jan 13, 2018

Thank you for taking your time to investigate, I appreciate that.
You can go ahead and remove vagrant stuff from molecule configuration files while adding ci.

@donat-b
Copy link
Owner

donat-b commented Feb 27, 2018

Have you been able to make any progress on this? :)

@paulfantom
Copy link
Contributor Author

Sorry, I've been occupied with other tasks and haven't got time.

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

No branches or pull requests

2 participants