-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
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:82Changing 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:93It 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels