Description of problem: After create app using oc new-app --context-dir , the build will failed.Since the files under contextdir should copy to the src dir in the build pod, not the whole git repo. Version-Release number of selected component (if applicable): openshift v3.0.2.903-29-g49953d6 kubernetes v1.2.0-alpha.1-1107-g4c8e6f4 oc v3.0.2.903-29-g49953d6 How reproducible: always Steps to Reproduce: 1.create a project $oc new-project test 2.new app $oc new-app https://github.com/openshift/sti-nodejs.git --context-dir=0.10/test/test-app/ --name='nodejs-test' 3.check the build log $oc get build $oc build-logs nodejs-test-1 Actual results: the build failed I1027 04:09:46.950918 1 sti.go:448] ---> Installing application source I1027 04:09:46.982971 1 sti.go:448] ---> Building your Node application from source E1027 04:09:48.033881 1 util.go:85] npm info it worked if it ends with ok E1027 04:09:48.033911 1 util.go:85] npm info using npm.28 E1027 04:09:48.033930 1 util.go:85] npm info using node.35 E1027 04:09:48.254073 1 util.go:85] npm ERR! install Couldn't read dependencies E1027 04:09:48.254108 1 util.go:85] npm ERR! package.json ENOENT, open '/opt/app-root/src/package.json' E1027 04:09:48.254135 1 util.go:85] npm ERR! package.json This is most likely not a problem with npm itself. E1027 04:09:48.254143 1 util.go:85] npm ERR! package.json npm can't find a package.json file in your current directory. E1027 04:09:48.254149 1 util.go:85] E1027 04:09:48.254155 1 util.go:85] npm ERR! System Linux 3.10.0-324.el7.x86_64 E1027 04:09:48.254161 1 util.go:85] npm ERR! command "node" "/opt/rh/nodejs010/root/usr/bin/npm" "install" "-d" E1027 04:09:48.254167 1 util.go:85] npm ERR! cwd /opt/app-root/src E1027 04:09:48.254173 1 util.go:85] npm ERR! node -v v0.10.35 E1027 04:09:48.254351 1 util.go:85] npm ERR! npm -v 1.4.28 E1027 04:09:48.254363 1 util.go:85] npm ERR! path /opt/app-root/src/package.json E1027 04:09:48.254369 1 util.go:85] npm ERR! code ENOPACKAGEJSON E1027 04:09:48.254377 1 util.go:85] npm ERR! errno 34 E1027 04:09:48.254401 1 util.go:85] npm ERR! E1027 04:09:48.254438 1 util.go:85] npm ERR! Additional logging details can be found in: E1027 04:09:48.254461 1 util.go:85] npm ERR! /opt/app-root/src/npm-debug.log E1027 04:09:48.254474 1 util.go:85] npm ERR! not ok code 0 Expected results: the build should success. Additional info: using sti command manually will success.like this: s2i build https://github.com/openshift/sti-nodejs.git --context-dir=0.10/test/test-app/ openshift/nodejs-010-centos7 nodejs-sample-app
I tested this and it worked as expected. If you can recreate it, please provide the following additional information: 1) the json for the buildconfig that was defined by new-app 2) run openshift with --loglevel=5 provide the failing build logs from that (setting openshift to loglevel 5 also enables verbose logging for the builds)
Ben ,I test it again, same problem, see the buiconfig and build log with level 5. http://pastebin.test.redhat.com/323097
i'm afraid you're going to need to wait for a new puddle to verify this, it appears the fix for context-dir behavior isn't in the level you're using. can you confirm against origin?
looks like the commit in question that fixed this was f076ce8eac7f5dab51f69de4e48d5a56adb99fd5 which went into origin on 10/24. it was broken since b10d7000b8a149e823e2874916fe9ca399e23aff which went in on 10/15.
it works with origin env , will verify again when the fix is merged to ose
verified on this version: openshift v3.0.2.903-114-g2849767 kubernetes v1.2.0-alpha.1-1107-g4c8e6f4 still failed.
Looks like the images weren't rebuilt with that puddle and this fix requires a new origin-sti-builder image. Assigning to scott to move to ON_QA when that happens.
Images have been rebuilt.
Verified with version: openshift v3.0.2.905 kubernetes v1.2.0-alpha.1-1107-g4c8e6f4