infopen / ansible-role-jenkins Goto Github PK
View Code? Open in Web Editor NEWThe Ansible Jenkins role used by Infopen company
License: MIT License
The Ansible Jenkins role used by Infopen company
License: MIT License
The current method takes too many time to be done, perhaps send lists to the groovy script to skip many cli calls.
Since I've add launcher management, docker plugin configuration is not idempotent.
Fix that point
DoD: only Molecule and testinfra used
DoD: This rule can configure Gitlab plugin
Think about this task how properly define the plugins and app configuration.
Look about :
DoD: This role can manage LDAP authentication backend using Groovy
I disable idempotence check on Travis, time to check why tasks return changed state
See #24
Hi ๐
This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.
Once you have closed this issue, I'll create separate pull requests for every update as soon as I find one.
That's it for now!
Happy merging! ๐ค
Check how manage properly job configuration
Last test break due to a non updated json file for update center.
Check if it's recurrent, or delay. Perhaps need to have a tolerance for version -1 :/
Update Jenkins URLs used to download packages
For v2.0 management, I disable CSRF due to CLI usage for configuration task.
Reactive this security settings once https://issues.jenkins-ci.org/browse/JENKINS-18114 is resolved
Repro:
mkvirtualenv molecule
pip install -r requirements.txt
molecule create
molecule converge
Fails at TASK [ansible-role-jenkins : Manage docker plugin clouds] *********************
:
failed: [jenkins-docker-xenial] (item={utemplates: [{uconfig_version: 2, uinstance_cap: 20, unum_executors: 1, utemplate_base: {umemory_limit: None, utty: False, unetwork: u, ubind_all_ports: False, uhostname: u, uenvironments: [], uprivileged: False, upull_credentials_id: u, ulxc_conf_string: u, udocker_command: u, uimage: uevarga/jenkins-slave, umac_address: u, uvolumes_from: [], uvolumes: [], ubind_ports: [], udns_hosts: [], uextra_hosts: [], umemory_swap: 0, ucpu_shares: None}, uretention_strategy: {uidle_minutes: 10, uclass: uonce}, uremote_fs_mapping: u/tmp, ulabel_string: u, uconnector: {uretry_wait_time: 0, ulaunch_timeout: 0, umax_num_retries: 0, usuffix_start_slave_cmd: u, uprefix_start_slave_cmd: u, uclass: ussh, ujvm_options: [], ujava_path: u, ussh_key_strategy_name: umanually_configured_ssh_key, uport: 22, ussh_key_strategy_value: ussh-jenkins-master-user}, uremove_volumes: False, umode: uNORMAL, upull_strategy: uPULL_LATEST, uremote_fs: u/home/jenkins}], uname: udocker-cloud-test, userver_url: uhttp://127.0.0.1:8081, uconnect_timeout: 10, ustate: upresent, uversion: None, uread_timeout: 10, ucredentials_id: usimple-jenkins-user, ucontainer_cap: 10, udocker_hostname: uFoo}) => {"changed": false, "item": {"connect_timeout": 10, "container_cap": 10, "credentials_id": "simple-jenkins-user", "docker_hostname": "Foo", "name": "docker-cloud-test", "read_timeout": 10, "server_url": "http://127.0.0.1:8081", "state": "present", "templates": [{"config_version": 2, "connector": {"class": "ssh", "java_path": "", "jvm_options": [], "launch_timeout": 0, "max_num_retries": 0, "port": 22, "prefix_start_slave_cmd": "", "retry_wait_time": 0, "ssh_key_strategy_name": "manually_configured_ssh_key", "ssh_key_strategy_value": "ssh-jenkins-master-user", "suffix_start_slave_cmd": ""}, "instance_cap": 20, "label_string": "", "mode": "NORMAL", "num_executors": 1, "pull_strategy": "PULL_LATEST", "remote_fs": "/home/jenkins", "remote_fs_mapping": "/tmp", "remove_volumes": false, "retention_strategy": {"class": "once", "idle_minutes": 10}, "template_base": {"bind_all_ports": false, "bind_ports": [], "cpu_shares": null, "dns_hosts": [], "docker_command": "", "environments": [], "extra_hosts": [], "hostname": "", "image": "evarga/jenkins-slave", "lxc_conf_string": "", "mac_address": "", "memory_limit": null, "memory_swap": 0, "network": "", "privileged": false, "pull_credentials_id": "", "tty": false, "volumes": [], "volumes_from": []}}], "version": null}, "msg": "
ERROR: Unexpected exception occurred while performing groovy command.
java.lang.RuntimeException: Docker cloud management error, error message : Adding docker cloud error, error message : Manage docker cloud create error, error message : Manage docker template list create error, error message : Manage docker template create error, error message : Manage docker template base create error, error message : Could not find matching constructor for: com.nirima.jenkins.plugins.docker.DockerTemplateBase(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, null, java.lang.Integer, null, java.lang.String, java.lang.Boolean, java.lang.Boolean, java.lang.Boolean, java.lang.String)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at RemoteClass.run(RemoteClass:642)
at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
at groovy.lang.GroovyShell.run(GroovyShell.java:518)
at groovy.lang.GroovyShell.run(GroovyShell.java:497)
at hudson.cli.GroovyCommand.run(GroovyCommand.java:89)
at hudson.cli.CLICommand.main(CLICommand.java:274)
at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:95)
at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:922)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:896)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:853)
at hudson.remoting.UserRequest.perform(UserRequest.java:207)
at hudson.remoting.UserRequest.perform(UserRequest.java:53)
at hudson.remoting.Request$2.run(Request.java:358)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:66)
at hudson.remoting.CallableDecoratorAdapter.call(CallableDecoratorAdapter.java:18)
at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
"}
Version tested with: develop 35ff275
DoD: Replace achaussier galaxy dependencies by infOpen roles
Error during tests with cli authentication
Jenkins 2.0 have a default password set, relates to #41
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.