minishift / minishift-centos-iso

CentOS based ISO as an alternative for boot2docker ISO
GNU Lesser General Public License v3.0
40 stars 33 forks source link

Fix #21: Create a CI setup for the image build #60

Closed coolbrg closed 7 years ago

coolbrg commented 7 years ago

Fix #21

Only docker-machine related tests at the moment as getting issues with minishift. Now, focusing on CI integration.

Test results (Took under a minute to execute)

$ make test
avocado run tests/test.py
JOB ID     : f089130b8f670a6b31044260c2f9e76ac7f19c73
JOB LOG    : /home/budhram/avocado/job-results/job-2016-12-14T19.18-f089130/job.log
TESTS      : 6
 (1/6) tests/test.py:MinishiftISOTest.test_boot_vm_out_of_iso: PASS (55.29 s)
 (2/6) tests/test.py:MinishiftISOTest.test_ssh_connection_to_vm: PASS (0.18 s)
 (3/6) tests/test.py:MinishiftISOTest.test_ip_of_vm: PASS (0.06 s)
 (4/6) tests/test.py:MinishiftISOTest.test_docker_env_evaluable: PASS (0.09 s)
 (5/6) tests/test.py:MinishiftISOTest.test_stopping_vm: PASS (1.30 s)
 (6/6) tests/test.py:MinishiftISOTest.test_removing_vm: PASS (0.17 s)
RESULTS    : PASS 6 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
TESTS TIME : 57.08 s

Test Logs

$ cat /home/budhram/avocado/job-results/job-2016-12-14T19.18-f089130/job.log
2016-12-14 19:18:08,868 extension        L0156 DEBUG| found extension EntryPoint.parse('journal = avocado.plugins.journal:JournalResult')
2016-12-14 19:18:08,868 extension        L0156 DEBUG| found extension EntryPoint.parse('tap = avocado.plugins.tap:TAPResult')
2016-12-14 19:18:08,868 extension        L0156 DEBUG| found extension EntryPoint.parse('human = avocado.plugins.human:Human')
2016-12-14 19:18:08,873 extension        L0156 DEBUG| found extension EntryPoint.parse('jobscripts = avocado.plugins.jobscripts:JobScripts')
2016-12-14 19:18:08,874 sysinfo          L0388 INFO | Commands configured by file: /etc/avocado/sysinfo/commands
2016-12-14 19:18:08,874 sysinfo          L0399 INFO | Files configured by file: /etc/avocado/sysinfo/files
2016-12-14 19:18:08,874 sysinfo          L0419 INFO | Profilers configured by file: /etc/avocado/sysinfo/profilers
2016-12-14 19:18:08,874 sysinfo          L0427 INFO | Profiler disabled
2016-12-14 19:18:08,880 job              L0315 INFO | Command line: /usr/bin/avocado run tests/test.py
2016-12-14 19:18:08,880 job              L0316 INFO | 
2016-12-14 19:18:08,880 job              L0321 INFO | Avocado version: 44.0
2016-12-14 19:18:08,880 job              L0333 INFO | 
2016-12-14 19:18:08,881 job              L0338 INFO | Config files read (in order):
2016-12-14 19:18:08,881 job              L0340 INFO | /etc/avocado/avocado.conf
2016-12-14 19:18:08,881 job              L0340 INFO | /etc/avocado/conf.d/gdb.conf
2016-12-14 19:18:08,881 job              L0340 INFO | /home/budhram/.config/avocado/avocado.conf
2016-12-14 19:18:08,881 job              L0345 INFO | 
2016-12-14 19:18:08,881 job              L0347 INFO | Avocado config:
2016-12-14 19:18:08,881 job              L0356 INFO | Section.Key                             Value
2016-12-14 19:18:08,881 job              L0356 INFO | datadir.paths.base_dir                  /usr/share/avocado
2016-12-14 19:18:08,881 job              L0356 INFO | datadir.paths.test_dir                  /usr/share/avocado/tests
2016-12-14 19:18:08,881 job              L0356 INFO | datadir.paths.data_dir                  /usr/share/avocado/data
2016-12-14 19:18:08,882 job              L0356 INFO | datadir.paths.logs_dir                  ~/avocado/job-results
2016-12-14 19:18:08,882 job              L0356 INFO | sysinfo.collect.enabled                 True
2016-12-14 19:18:08,882 job              L0356 INFO | sysinfo.collect.installed_packages      False
2016-12-14 19:18:08,882 job              L0356 INFO | sysinfo.collect.profiler                False
2016-12-14 19:18:08,882 job              L0356 INFO | sysinfo.collect.locale                  C
2016-12-14 19:18:08,882 job              L0356 INFO | sysinfo.collectibles.commands           /etc/avocado/sysinfo/commands
2016-12-14 19:18:08,882 job              L0356 INFO | sysinfo.collectibles.files              /etc/avocado/sysinfo/files
2016-12-14 19:18:08,882 job              L0356 INFO | sysinfo.collectibles.profilers          /etc/avocado/sysinfo/profilers
2016-12-14 19:18:08,882 job              L0356 INFO | runner.output.colored                   True
2016-12-14 19:18:08,882 job              L0356 INFO | runner.output.utf8                      
2016-12-14 19:18:08,882 job              L0356 INFO | remoter.behavior.reject_unknown_hosts   False
2016-12-14 19:18:08,882 job              L0356 INFO | remoter.behavior.disable_known_hosts    False
2016-12-14 19:18:08,882 job              L0356 INFO | job.output.loglevel                     debug
2016-12-14 19:18:08,882 job              L0356 INFO | restclient.connection.hostname          localhost
2016-12-14 19:18:08,882 job              L0356 INFO | restclient.connection.port              9405
2016-12-14 19:18:08,882 job              L0356 INFO | restclient.connection.username          
2016-12-14 19:18:08,882 job              L0356 INFO | restclient.connection.password          
2016-12-14 19:18:08,882 job              L0356 INFO | plugins.disable                         []
2016-12-14 19:18:08,882 job              L0356 INFO | plugins.skip_broken_plugin_notification []
2016-12-14 19:18:08,882 job              L0356 INFO | plugins.loaders                         ['file', '@DEFAULT']
2016-12-14 19:18:08,882 job              L0356 INFO | gdb.paths.gdb                           /usr/bin/gdb
2016-12-14 19:18:08,882 job              L0356 INFO | gdb.paths.gdbserver                     /usr/bin/gdbserver
2016-12-14 19:18:08,882 job              L0357 INFO | 
2016-12-14 19:18:08,882 job              L0362 INFO | Avocado Data Directories:
2016-12-14 19:18:08,882 job              L0363 INFO | 
2016-12-14 19:18:08,883 job              L0364 INFO | Avocado replaces config dirs that can't be accessed
2016-12-14 19:18:08,883 job              L0365 INFO | with sensible defaults. Please edit your local config
2016-12-14 19:18:08,883 job              L0366 INFO | file to customize values
2016-12-14 19:18:08,883 job              L0367 INFO | 
2016-12-14 19:18:08,883 job              L0368 INFO | base     /home/budhram/avocado
2016-12-14 19:18:08,883 job              L0369 INFO | tests    /home/budhram/avocado/tests
2016-12-14 19:18:08,884 job              L0370 INFO | data     /home/budhram/avocado/data
2016-12-14 19:18:08,884 job              L0371 INFO | logs     /home/budhram/avocado/job-results
2016-12-14 19:18:08,884 job              L0372 INFO | 
2016-12-14 19:18:08,884 job              L0386 INFO | Temporary dir: /var/tmp/avocado_uLB32C
2016-12-14 19:18:08,884 job              L0387 INFO | 
2016-12-14 19:18:08,884 job              L0394 INFO | Variant 1:    /
2016-12-14 19:18:08,884 job              L0397 INFO | 
2016-12-14 19:18:08,884 job              L0306 INFO | Job ID: f089130b8f670a6b31044260c2f9e76ac7f19c73
2016-12-14 19:18:08,884 job              L0309 INFO | 
2016-12-14 19:18:08,930 sysinfo          L0107 DEBUG| Not logging /proc/pci (file does not exist)
2016-12-14 19:18:08,943 sysinfo          L0105 DEBUG| Not logging /proc/slabinfo (lack of permissions)
2016-12-14 19:18:08,949 sysinfo          L0107 DEBUG| Not logging /sys/kernel/debug/sched_features (file does not exist)
2016-12-14 19:18:08,997 sysinfo          L0388 INFO | Commands configured by file: /etc/avocado/sysinfo/commands
2016-12-14 19:18:08,997 sysinfo          L0399 INFO | Files configured by file: /etc/avocado/sysinfo/files
2016-12-14 19:18:08,998 sysinfo          L0419 INFO | Profilers configured by file: /etc/avocado/sysinfo/profilers
2016-12-14 19:18:08,998 sysinfo          L0427 INFO | Profiler disabled
2016-12-14 19:18:09,005 multiplexer      L0168 DEBUG| PARAMS (key=timeout, path=*, default=None) => None
2016-12-14 19:18:09,005 test             L0219 INFO | START 1-tests/test.py:MinishiftISOTest.test_boot_vm_out_of_iso
2016-12-14 19:18:09,097 test             L0017 INFO | ################################################################
2016-12-14 19:18:09,097 test             L0018 INFO | Avocado version : 44.0
2016-12-14 19:18:09,097 test             L0019 INFO | ################################################################
2016-12-14 19:18:09,098 test             L0095 INFO | Executing command : /home/budhram/redhat/minishift-centos-iso/tests/../bin/docker-machine create docker-machine-test-vm -d kvm --kvm-boot2docker-url=/home/budhram/redhat/minishift-centos-iso/tests/../build/minishift-centos.iso
2016-12-14 19:19:04,380 sysinfo          L0341 DEBUG| Not logging /var/log/messages (lack of permissions)
2016-12-14 19:19:04,391 test             L0613 INFO | PASS 1-tests/test.py:MinishiftISOTest.test_boot_vm_out_of_iso
2016-12-14 19:19:04,391 test             L0594 INFO | 
2016-12-14 19:19:04,414 sysinfo          L0388 INFO | Commands configured by file: /etc/avocado/sysinfo/commands
2016-12-14 19:19:04,415 sysinfo          L0399 INFO | Files configured by file: /etc/avocado/sysinfo/files
2016-12-14 19:19:04,415 sysinfo          L0419 INFO | Profilers configured by file: /etc/avocado/sysinfo/profilers
2016-12-14 19:19:04,415 sysinfo          L0427 INFO | Profiler disabled
2016-12-14 19:19:04,423 multiplexer      L0168 DEBUG| PARAMS (key=timeout, path=*, default=None) => None
2016-12-14 19:19:04,423 test             L0219 INFO | START 2-tests/test.py:MinishiftISOTest.test_ssh_connection_to_vm
2016-12-14 19:19:04,432 test             L0017 INFO | ################################################################
2016-12-14 19:19:04,432 test             L0018 INFO | Avocado version : 44.0
2016-12-14 19:19:04,432 test             L0019 INFO | ################################################################
2016-12-14 19:19:04,432 test             L0095 INFO | Executing command : /home/budhram/redhat/minishift-centos-iso/tests/../bin/docker-machine ssh docker-machine-test-vm exit
2016-12-14 19:19:04,599 sysinfo          L0341 DEBUG| Not logging /var/log/messages (lack of permissions)
2016-12-14 19:19:04,608 test             L0613 INFO | PASS 2-tests/test.py:MinishiftISOTest.test_ssh_connection_to_vm
2016-12-14 19:19:04,608 test             L0594 INFO | 
2016-12-14 19:19:04,631 sysinfo          L0388 INFO | Commands configured by file: /etc/avocado/sysinfo/commands
2016-12-14 19:19:04,631 sysinfo          L0399 INFO | Files configured by file: /etc/avocado/sysinfo/files
2016-12-14 19:19:04,631 sysinfo          L0419 INFO | Profilers configured by file: /etc/avocado/sysinfo/profilers
2016-12-14 19:19:04,632 sysinfo          L0427 INFO | Profiler disabled
2016-12-14 19:19:04,638 multiplexer      L0168 DEBUG| PARAMS (key=timeout, path=*, default=None) => None
2016-12-14 19:19:04,638 test             L0219 INFO | START 3-tests/test.py:MinishiftISOTest.test_ip_of_vm
2016-12-14 19:19:04,660 test             L0017 INFO | ################################################################
2016-12-14 19:19:04,660 test             L0018 INFO | Avocado version : 44.0
2016-12-14 19:19:04,660 test             L0019 INFO | ################################################################
2016-12-14 19:19:04,660 test             L0095 INFO | Executing command : /home/budhram/redhat/minishift-centos-iso/tests/../bin/docker-machine ip docker-machine-test-vm
2016-12-14 19:19:04,710 sysinfo          L0341 DEBUG| Not logging /var/log/messages (lack of permissions)
2016-12-14 19:19:04,716 test             L0613 INFO | PASS 3-tests/test.py:MinishiftISOTest.test_ip_of_vm
2016-12-14 19:19:04,717 test             L0594 INFO | 
2016-12-14 19:19:04,744 sysinfo          L0388 INFO | Commands configured by file: /etc/avocado/sysinfo/commands
2016-12-14 19:19:04,745 sysinfo          L0399 INFO | Files configured by file: /etc/avocado/sysinfo/files
2016-12-14 19:19:04,745 sysinfo          L0419 INFO | Profilers configured by file: /etc/avocado/sysinfo/profilers
2016-12-14 19:19:04,745 sysinfo          L0427 INFO | Profiler disabled
2016-12-14 19:19:04,752 multiplexer      L0168 DEBUG| PARAMS (key=timeout, path=*, default=None) => None
2016-12-14 19:19:04,752 test             L0219 INFO | START 4-tests/test.py:MinishiftISOTest.test_docker_env_evaluable
2016-12-14 19:19:04,781 test             L0017 INFO | ################################################################
2016-12-14 19:19:04,781 test             L0018 INFO | Avocado version : 44.0
2016-12-14 19:19:04,781 test             L0019 INFO | ################################################################
2016-12-14 19:19:04,782 test             L0095 INFO | Executing command : /home/budhram/redhat/minishift-centos-iso/tests/../bin/docker-machine env docker-machine-test-vm
2016-12-14 19:19:04,862 sysinfo          L0341 DEBUG| Not logging /var/log/messages (lack of permissions)
2016-12-14 19:19:04,869 test             L0613 INFO | PASS 4-tests/test.py:MinishiftISOTest.test_docker_env_evaluable
2016-12-14 19:19:04,869 test             L0594 INFO | 
2016-12-14 19:19:04,901 sysinfo          L0388 INFO | Commands configured by file: /etc/avocado/sysinfo/commands
2016-12-14 19:19:04,901 sysinfo          L0399 INFO | Files configured by file: /etc/avocado/sysinfo/files
2016-12-14 19:19:04,901 sysinfo          L0419 INFO | Profilers configured by file: /etc/avocado/sysinfo/profilers
2016-12-14 19:19:04,901 sysinfo          L0427 INFO | Profiler disabled
2016-12-14 19:19:04,908 multiplexer      L0168 DEBUG| PARAMS (key=timeout, path=*, default=None) => None
2016-12-14 19:19:04,909 test             L0219 INFO | START 5-tests/test.py:MinishiftISOTest.test_stopping_vm
2016-12-14 19:19:04,970 test             L0017 INFO | ################################################################
2016-12-14 19:19:04,970 test             L0018 INFO | Avocado version : 44.0
2016-12-14 19:19:04,970 test             L0019 INFO | ################################################################
2016-12-14 19:19:04,970 test             L0095 INFO | Executing command : /home/budhram/redhat/minishift-centos-iso/tests/../bin/docker-machine stop docker-machine-test-vm
2016-12-14 19:19:06,218 test             L0073 INFO | Executing command : /home/budhram/redhat/minishift-centos-iso/tests/../bin/docker-machine status docker-machine-test-vm
2016-12-14 19:19:06,262 sysinfo          L0341 DEBUG| Not logging /var/log/messages (lack of permissions)
2016-12-14 19:19:06,269 test             L0613 INFO | PASS 5-tests/test.py:MinishiftISOTest.test_stopping_vm
2016-12-14 19:19:06,269 test             L0594 INFO | 
2016-12-14 19:19:06,288 sysinfo          L0388 INFO | Commands configured by file: /etc/avocado/sysinfo/commands
2016-12-14 19:19:06,288 sysinfo          L0399 INFO | Files configured by file: /etc/avocado/sysinfo/files
2016-12-14 19:19:06,289 sysinfo          L0419 INFO | Profilers configured by file: /etc/avocado/sysinfo/profilers
2016-12-14 19:19:06,289 sysinfo          L0427 INFO | Profiler disabled
2016-12-14 19:19:06,295 multiplexer      L0168 DEBUG| PARAMS (key=timeout, path=*, default=None) => None
2016-12-14 19:19:06,295 test             L0219 INFO | START 6-tests/test.py:MinishiftISOTest.test_removing_vm
2016-12-14 19:19:06,305 test             L0017 INFO | ################################################################
2016-12-14 19:19:06,306 test             L0018 INFO | Avocado version : 44.0
2016-12-14 19:19:06,306 test             L0019 INFO | ################################################################
2016-12-14 19:19:06,306 test             L0095 INFO | Executing command : /home/budhram/redhat/minishift-centos-iso/tests/../bin/docker-machine rm -f docker-machine-test-vm
2016-12-14 19:19:06,454 test             L0086 INFO | Executing command : /home/budhram/redhat/minishift-centos-iso/tests/../bin/docker-machine status docker-machine-test-vm
2016-12-14 19:19:06,466 sysinfo          L0341 DEBUG| Not logging /var/log/messages (lack of permissions)
2016-12-14 19:19:06,472 test             L0613 INFO | PASS 6-tests/test.py:MinishiftISOTest.test_removing_vm
2016-12-14 19:19:06,472 test             L0594 INFO | 
2016-12-14 19:19:06,540 sysinfo          L0107 DEBUG| Not logging /proc/pci (file does not exist)
2016-12-14 19:19:06,558 sysinfo          L0105 DEBUG| Not logging /proc/slabinfo (lack of permissions)
2016-12-14 19:19:06,567 sysinfo          L0107 DEBUG| Not logging /sys/kernel/debug/sched_features (file does not exist)
2016-12-14 19:19:06,616 job              L0472 INFO | Test results available in /home/budhram/avocado/job-results/job-2016-12-14T19.18-f089130
LalatenduMohanty commented 7 years ago

LGTM. Let me know if you want me to test.

hferentschik commented 7 years ago

@budhrg can you get this to run, building your fork? Do you have already an URL?

hferentschik commented 7 years ago

@budhrg Set everything up, let it build your fork and branch. Then we can see this in action. If all is good we just change the repo and branch.

coolbrg commented 7 years ago

@hferentschik @kbsingh @LalatenduMohanty @praveenkumar

Updated the PR as per the JJB approach. The content has not been tested yet in ci.centos but locally it seems to create the job with required configurations.

Need @kbsingh help to proceed further.

A ticket has been raised in ci.centos.org here to get new user altogether for minishift.

Service-job content is similar to Almighty job here.

coolbrg commented 7 years ago

This PR need to be updated as per the https://github.com/Minishift/minishift-ci-jobs.

Closing it for now.