codegyre / roboci Goto Github PK
View Code? Open in Web Editor NEWvirtualized environment runner for Continuous Integration servers
Home Page: http://phptest.club/t/roboci-run-travisci-builds-locally/170
License: MIT License
virtualized environment runner for Continuous Integration servers
Home Page: http://phptest.club/t/roboci-run-travisci-builds-locally/170
License: MIT License
I think this project is complatible with robo 0.4.0, but 0.5.x seemed to introduce some BC, mostly namespace changes and class rename.
Ran into a bug using a .travis.yml
file that didn't specify everything as an Array. To reproduce, just check out Bash-it/bash-it@master, and use their simple .travis.yml
:
~/src/pub/bash-it ± |master ✓| $ cat .travis.yml
sudo: false
install: git clone --depth 1 https://github.com/sstephenson/bats.git
script: PATH="./bats/bin:$PATH" test/run
language: c
~/src/pub/bash-it ± |master ✓| $ robo ci:travis-prepare
PHP Warning: array_merge(): Argument #2 is not an array in /Users/jcuzella/.bash_it/vendor/codegyre/robo-ci/src/ConfigParser/Travis.php on line 36
Warning: array_merge(): Argument #2 is not an array in /Users/jcuzella/.bash_it/vendor/codegyre/robo-ci/src/ConfigParser/Travis.php on line 36
PHP Warning: Invalid argument supplied for foreach() in /Users/jcuzella/.bash_it/vendor/codegyre/robo-ci/src/Command/Travis/Prepare.php on line 82
Warning: Invalid argument supplied for foreach() in /Users/jcuzella/.bash_it/vendor/codegyre/robo-ci/src/Command/Travis/Prepare.php on line 82
[Robo\Task\WriteToFileTask] Writing to .roboci/5.6.14/Dockerfile.
➜ Dockerfile for running Travis saved to .roboci/5.6.14/Dockerfile
[Codegyre\RoboCI\Task\CreateStartScript] Writing .roboci/5.6.14/start.sh
[Codegyre\RoboCI\Task\CreateRunScript] Writing .roboci/5.6.14/run.sh
[Robo\Task\WriteToFileTask] Writing to .roboci/5.6.14/env.yml.
➜ Make sure it is available when executing travis:run
ERROR: Invalid argument supplied for foreach()
in /Users/jcuzella/.bash_it/vendor/codegyre/robo-ci/src/Command/Travis/Prepare.php:82
Changing everything to arrays, and forcing it to use language: php
seems to make robo
mostly happy:
~/src/pub/bash-it ± |master ✓| $ cat .travis.yml
sudo: false
before_install:
- bash --version
install:
- git clone --depth 1 https://github.com/sstephenson/bats.git
script:
- PATH="./bats/bin:$PATH" test/run
language: php
php:
- 5.6.14
~/src/pub/bash-it ± |master ✓| $ robo ci:travis-prepare
[Robo\Task\WriteToFileTask] Writing to .roboci/5.6.14/Dockerfile.
➜ Dockerfile for running Travis saved to .roboci/5.6.14/Dockerfile
[Codegyre\RoboCI\Task\CreateStartScript] Writing .roboci/5.6.14/start.sh
[Codegyre\RoboCI\Task\CreateRunScript] Writing .roboci/5.6.14/run.sh
[Robo\Task\WriteToFileTask] Writing to .roboci/5.6.14/env.yml.
➜ Make sure it is available when executing travis:run
ERROR: mkdir(): No such file or directory
in /Users/jcuzella/.bash_it/vendor/codegyre/robo-ci/src/Command/Travis/Prepare.php:59
Seems to still throw an error on src/Command/Travis/Prepare.php:59, but running robo ci:run
appears to partially work:
~/src/pub/bash-it ± |master ✓| $ robo ci:run 5.6.14
[Robo\Task\FileSystemStackTask] copy [".roboci\/5.6.14\/Dockerfile","Dockerfile"]
[Robo\Task\WriteToFileTask] Writing to Dockerfile.
[Codegyre\RoboDocker\Task\Build] running docker build -t roboci_run .
Sending build context to Docker daemon 39.72 MB
Sending build context to Docker daemon
Step 0 : FROM davert/roboci-php
Pulling repository davert/roboci-php
195cde63d41a: Pulling image (latest) from davert/roboci-php
195cde63d41a: Pulling image (latest) from davert/roboci-php, endpoint: https://registry-1.docker.io/v1/
195cde63d41a: Pulling dependent layers
511136ea3c5a: Download complete
93c381d2c255: Pulling metadata
93c381d2c255: Pulling fs layer
93c381d2c255: Download complete
a5208e800234: Pulling metadata
[...SNIP...]
---> 195cde63d41a
Step 1 : WORKDIR /home/travis/builds
---> Using cache
---> c06ae90412ca
Step 2 : USER root
---> Using cache
---> c3a62bf9e0aa
Step 3 : RUN phpenv global 5.6.14
---> Running in 8ceca38f4117
rbenv: version `5.6.14' not installed
The command '/bin/sh -c phpenv global 5.6.14' returned a non-zero code: 1
Sending build context to Docker daemon 39.72 MB build context to Docker daemon 557.1 kB
[Codegyre\RoboDocker\Task\Build] Error Sending build context to Docker daemon
[Codegyre\RoboDocker\Task\Build] Error Step 0 : FROM davert/roboci-php
[Codegyre\RoboDocker\Task\Build] Error ---> 195cde63d41a
[Codegyre\RoboDocker\Task\Build] Error Step 1 : WORKDIR /home/travis/builds
[Codegyre\RoboDocker\Task\Build] Error ---> Using cache
[Codegyre\RoboDocker\Task\Build] Error ---> c06ae90412ca
[Codegyre\RoboDocker\Task\Build] Error Step 2 : USER root
[Codegyre\RoboDocker\Task\Build] Error ---> Using cache
[Codegyre\RoboDocker\Task\Build] Error ---> c3a62bf9e0aa
[Codegyre\RoboDocker\Task\Build] Error Step 3 : RUN phpenv global 5.6.14
[Codegyre\RoboDocker\Task\Build] Error ---> Running in 8ceca38f4117
[Codegyre\RoboDocker\Task\Build] Error rbenv: version `5.6.14' not installed
[Codegyre\RoboDocker\Task\Build] Error
[Robo\Task\FileSystemStackTask] remove ["Dockerfile"]
[Codegyre\RoboCI\Task\RunService] Running mysql service container
[Codegyre\RoboDocker\Task\Run] running docker run -d --name robo_service_mysql561eedf115029 -i --cidfile /var/folders/_8/fv9hxvf177jcm22v_m913398b80c28/T/docker_561eedf38efcd.cid roboci_service_mysql
b28678beb898cdc6e3f301edebfef5344de76f8362ec1bc451a603833ecf4601
[Codegyre\RoboCI\Task\RunService] Running postgresql service container
[Codegyre\RoboDocker\Task\Run] running docker run -d --name robo_service_postgresql561eedf115029 -i --cidfile /var/folders/_8/fv9hxvf177jcm22v_m913398b80c28/T/docker_561eedf4332b5.cid roboci_service_postgresql
938e8c29549495a2af63572311ca046ac9354d7602ffec813555ab96cc8ba945
[Codegyre\RoboCI\Task\RunContainer] running docker run --name robo_build_561eedf115029 -e TRAVIS_BUILD_NUMBER=561eedf115029 --link robo_service_mysql561eedf115029:mysql --link robo_service_postgresql561eedf115029:postgresql -w /home/travis/builds --privileged -i --cidfile /var/folders/_8/fv9hxvf177jcm22v_m913398b80c28/T/docker_561eedf478b74.cid roboci_run /bin/bash .roboci/5.6.14/start.sh && /bin/bash .roboci/5.6.14/run.sh
Unable to find image 'roboci_run:latest' locally
Pulling repository roboci_run
Error: image library/roboci_run:latest not found
[Codegyre\RoboCI\Task\RunContainer] Error Exit code 1
PHP Warning: file_get_contents(/var/folders/_8/fv9hxvf177jcm22v_m913398b80c28/T/docker_561eedf478b74.cid): failed to open stream: No such file or directory in /Users/jcuzella/.bash_it/vendor/codegyre/robo-docker/src/Task/Run.php on line 92
Warning: file_get_contents(/var/folders/_8/fv9hxvf177jcm22v_m913398b80c28/T/docker_561eedf478b74.cid): failed to open stream: No such file or directory in /Users/jcuzella/.bash_it/vendor/codegyre/robo-docker/src/Task/Run.php on line 92
[Codegyre\RoboCI\Task\RunContainer] Error Exit code 1
[Codegyre\RoboDocker\Task\Stop] running docker stop b28678beb898cdc6e3f301edebfef5344de76f8362ec1bc451a603833ecf4601
b28678beb898cdc6e3f301edebfef5344de76f8362ec1bc451a603833ecf4601
[Codegyre\RoboDocker\Task\Stop] running docker stop 938e8c29549495a2af63572311ca046ac9354d7602ffec813555ab96cc8ba945
938e8c29549495a2af63572311ca046ac9354d7602ffec813555ab96cc8ba945
➜ BUILD FAILED
➜ To enter this container, save it with docker commit travis_build_failed
➜ Then you can run it: docker run -i -t travis_build_failed bash
ERROR: unlink(/var/folders/_8/fv9hxvf177jcm22v_m913398b80c28/T/docker_561eedf478b74.cid): No such file or directory
in /Users/jcuzella/.bash_it/vendor/codegyre/robo-docker/src/Task/Run.php:93
It looks like RoboCI makes a lot of assumptions. It appears to assume you're testing a PHP app with mysql and postgresql containers. I just wanted to try it out using a basic bash container testing with bats
. Not sure if this is an intended use, but it seems like a simple enough case to support.
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.