fabric8io-images / s2i

OpenShift S2I images for Java and Karaf applications
Apache License 2.0
70 stars 84 forks source link

test.sh should not require fish-pepper to be installed but use its containerized version #223

Open vorburger opened 5 years ago

vorburger commented 5 years ago

@rhuss comment over in #219 :

Installing fish-pepper might be a pain, so I recommend to run it from within a Docker container like in

docker run -it --rm -v $(pwd):/fp fabric8/fish-pepper

(of course you need to able to use volume mounts)

See also https://github.com/fabric8io-images/fish-pepper/tree/master/docker

gave me an idea - we should use it like this in the test.sh ...

rhuss commented 5 years ago

Good idea. I think that makes total sense, especially in CI environments where it should be no problem to get volume mounts running (i.e. when its not a remote Docker daemon)

vorburger commented 5 years ago

@rhuss I've briefly tested this locally and am running into a problem, do you know what this means:

$ cd /tmp
$ git clone git@github.com:fabric8io-images/s2i.git
Cloning into 's2i'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 3913 (delta 0), reused 2 (delta 0), pack-reused 3907
Receiving objects: 100% (3913/3913), 8.38 MiB | 6.94 MiB/s, done.
Resolving deltas: 100% (2710/2710), done.
$ cd s2i/java
$ docker run -it --rm -v $(pwd):/fp fabric8/fish-pepper
* Loading external blocks
  Cloning https://github.com/fabric8io/run-java-sh.git (Tag: v1.3.0)
  Cloning https://github.com/fabric8io/agent-bond.git (Tag: v1.2.0)
The requested type does not match the type in the ODB
Error: The requested type does not match the type in the ODB
    at Object.Future.wait (/usr/lib/node_modules/fish-pepper/node_modules/fibers/future.js:449:15)
    at Object.exports.load (/usr/lib/node_modules/fish-pepper/fp/block-loader/nodegit.js:18:17)
    at /usr/lib/node_modules/fish-pepper/fp/block-loader.js:24:33
    at Array.forEach (native)
    at Object.exports.loadRemote (/usr/lib/node_modules/fish-pepper/fp/block-loader.js:20:15)
    at setupContext (/usr/lib/node_modules/fish-pepper/fish-pepper.js:290:19)
    at /usr/lib/node_modules/fish-pepper/fish-pepper.js:26:11
    at /usr/lib/node_modules/fish-pepper/node_modules/fibers/future.js:467:21
    - - - - -
    at Error (native)
rhuss commented 5 years ago

I remember darkly. It has todo with how tag are handled (there are two different ways in git). Which image of fish-peper did you use ?

vorburger commented 5 years ago

Which image of fish-peper did you use ?

$ docker run -it --rm -v $(pwd):/fp fabric8/fish-pepper