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

Add Cirrus CI configuration example #1807

Closed
network-shark opened this issue Mar 6, 2019 · 6 comments
Closed

Add Cirrus CI configuration example #1807

network-shark opened this issue Mar 6, 2019 · 6 comments

Comments

@network-shark
Copy link

Hello ,

I'm trying to find a solution to test my ansible roles against freebsd . On my localhost I'm using vagrant to start a vm ... . It's not fast but it works great ! Thanks for that.

As far as I know the only cicd pipeline with freebsd support is cirrus ci . I would like to use there service , but I without a cirrus ci driver I can't use there service .

Are there any plans to implement cirrus ?

best regards, sebastian

@network-shark network-shark changed the title Cirrus CI Driver Cirrus CI Driver / Freebsd support Mar 6, 2019
@ssbarnea
Copy link
Member

ssbarnea commented Mar 6, 2019

Thanks for the issue, I am glad to read about Cirrus CI as I didn't know about until today. Really glad to see that it supports such a wide range of platforms and that it can also use your own hardware. I happen to have some free nodes in my garage which I would be glad to put them to a good use.

What I do not understand is why molecule would need a driver for for cirrusci? Or maybe I look from the wrong angle. Currently Molecule is using Travis CI (which is slow), but in order to use it it does not need any driver, just a .travis.yml file that defines the jobs.

@decentral1se
Copy link
Contributor

Hi @network-shark! We have some documentation regarding using Molecule with CI systems: https://molecule.readthedocs.io/en/latest/testing.html#continuous-integration. I have no experience with Cirrus but perhaps you could try for an integration. Typically, the issue is that CI systems don't allow to use Vagrant on them because they don't support this virtualisation. A lot of people overcome this by using another driver (see https://molecule.readthedocs.io/en/latest/configuration.html#driver), like Docker or from another hosting provider (AWS, Linode ...).

@network-shark
Copy link
Author

network-shark commented Mar 7, 2019

I think my problem is already discussed / solved in this PR

cirruslabs/cirrus-ci-docs#125

sass/node-sass#2592

I will try to use this as an example. I don't need the part for different architectures , but using jails as isolated dev environment is exactly what I need.... .

@decentral1se decentral1se changed the title Cirrus CI Driver / Freebsd support Add Cirrus CI configuration example Mar 7, 2019
@decentral1se
Copy link
Contributor

OK, great, hopefully we see a documentation PR for the configuration back here 😄

@network-shark
Copy link
Author

network-shark commented Mar 13, 2019

While trying to implement my solution. I don't no how to deal with this problem.

https://cirrus-ci.com/task/4647570440716288

The build fails , because it does not find my role. I think it could be a problem with path env?

ANSIBLE_CONFIG=/tmp/molecule/cirrus-ci-build/cirrusci/ansible.cfg ANSIBLE_FILTER_PLUGINS=/usr/local/lib/python3.6/site-packages/molecule/provisioner/ansible/plugins/filters:/tmp/molecule/cirrus-ci-build/cirrusci/plugins/filters:/tmp/cirrus-ci-build/plugins/filters ANSIBLE_LIBRARY=/usr/local/lib/python3.6/site-packages/molecule/provisioner/ansible/plugins/libraries:/tmp/molecule/cirrus-ci-build/cirrusci/library:/tmp/cirrus-ci-build/library ANSIBLE_ROLES_PATH=/tmp/molecule/cirrus-ci-build/cirrusci/roles:/tmp MOLECULE_DEBUG=True MOLECULE_DEPENDENCY_NAME=galaxy MOLECULE_DRIVER_NAME=delegated MOLECULE_ENV_FILE=/tmp/cirrus-ci-build/.env.yml MOLECULE_EPHEMERAL_DIRECTORY=/tmp/molecule/cirrus-ci-build/cirrusci MOLECULE_FILE=/tmp/cirrus-ci-build/molecule/cirrusci/molecule.yml MOLECULE_INSTANCE_CONFIG=/tmp/molecule/cirrus-ci-build/cirrusci/instance_config.yml MOLECULE_INVENTORY_FILE=/tmp/molecule/cirrus-ci-build/cirrusci/ansible_inventory.yml MOLECULE_LINT_NAME=yamllint MOLECULE_PROJECT_DIRECTORY=/tmp/cirrus-ci-build MOLECULE_PROVISIONER_LINT_NAME=ansible-lint MOLECULE_PROVISIONER_NAME=ansible MOLECULE_SCENARIO_DIRECTORY=/tmp/cirrus-ci-build/molecule/cirrusci MOLECULE_SCENARIO_NAME=cirrusci MOLECULE_VERIFIER_LINT_NAME=flake8 MOLECULE_VERIFIER_NAME=testinfra MOLECULE_VERIFIER_TEST_DIRECTORY=/tmp/cirrus-ci-build/molecule/cirrusci/tests
DEBUG: COMMAND
/usr/local/bin/ansible-playbook --skip-tags=molecule-notest,notest --diff --syntax-check --inventory=/tmp/molecule/cirrus-ci-build/cirrusci/ansible_inventory.yml /tmp/cirrus-ci-build/molecule/cirrusci/playbook.yml -vvv
ansible-playbook 2.7.8
config file = /tmp/molecule/cirrus-ci-build/cirrusci/ansible.cfg
configured module search path = ['/usr/local/lib/python3.6/site-packages/molecule/provisioner/ansible/plugins/libraries', '/tmp/molecule/cirrus-ci-build/cirrusci/library', '/tmp/cirrus-ci-build/library']
ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 3.6.8 (default, Feb 7 2019, 01:15:49) [GCC 4.2.1 Compatible FreeBSD Clang 6.0.1 (tags/RELEASE_601/final 335540)]
Using /tmp/molecule/cirrus-ci-build/cirrusci/ansible.cfg as config file
/tmp/molecule/cirrus-ci-build/cirrusci/ansible_inventory.yml did not meet host_list requirements, check plugin documentation if this is unexpected
/tmp/molecule/cirrus-ci-build/cirrusci/ansible_inventory.yml did not meet script requirements, check plugin documentation if this is unexpected
Parsed /tmp/molecule/cirrus-ci-build/cirrusci/ansible_inventory.yml inventory source with yaml plugin
ERROR! the role 'ansible-role-unbound' was not found in /tmp/cirrus-ci-build/molecule/cirrusci/roles:/tmp/molecule/cirrus-ci-build/cirrusci/roles:/tmp:/tmp/cirrus-ci-build/molecule/cirrusci
The error appears to have been in '/tmp/cirrus-ci-build/molecule/cirrusci/playbook.yml': line 5, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
roles:
- ansible-role-unbound
^ here
ERROR:

@ssbarnea
Copy link
Member

Closin but a PR woudl be accepted.

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

3 participants