Description of problem: the assemble/run/save-artifacts scripts can not combine to work when they come from different url. Version-Release number of selected component (if applicable): fedora20_x86_64 latest gear built(gear version alpha3, build a91156f) How reproducible: always Steps to Reproduce: 1. Make assemble/run/save-artifacts scripts come from different url eg: app source only contains assemble script; user specified remote url only contains run script; save-artifacts script comes from the default image url. 2. Do gear build gear build git://github.com/chunyunchen/sinatra-app-example openshift/ruby-19-centos testapp1 -s https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts Actual results: ERROR: Reading error while downloading https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble (Failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble, response code 404) ERROR: Reading error while downloading https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts (Failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts, response code 404) An error occured: Scripts download failed Expected results: The assemble/run/save-artifacts scripts should combine to work well when they come from different url. Additional info:
https://github.com/openshift/geard/pull/241
The new logs: [fedora@ip-10-81-156-41 ~]$ sti build git://github.com/chunyunchen/sinatra-app-example chunyunchen/ruby-20-centos ccyapp -s https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts --loglevel=1 I1218 06:29:07.316324 17786 docker.go:118] Pulling image chunyunchen/ruby-20-centos W1218 06:29:07.916907 17786 download.go:117] Unable to download https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble (failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble, response code 404) W1218 06:29:07.964480 17786 download.go:117] Unable to download https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts (failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts, response code 404) I1218 06:29:07.967313 17786 build.go:82] Clean build will be performed I1218 06:29:07.967338 17786 build.go:197] Downloading git://github.com/chunyunchen/sinatra-app-example to directory /tmp/sti602577611/upload/src Cloning into '/tmp/sti602577611/upload/src'... remote: Counting objects: 95, done. remote: Compressing objects: 100% (56/56), done. remote: Total 95 (delta 23), reused 91 (delta 23) Receiving objects: 100% (95/95), 10.25 KiB | 0 bytes/s, done. Resolving deltas: 100% (23/23), done. Checking connectivity... done. /opt/ruby/bin/sti-helper: line 12: /opt/ruby/bin/assemble: No such file or directory F1218 06:29:10.471922 17786 main.go:146] An error occurred: non-zero (1) exit code from fyi, I have put the 'assemble' script under .sti/bin directory of app source repository when testing, seams sti build did not use the scripts from app source according to the logs like "/opt/ruby/bin/sti-helper: line 12: /opt/ruby/bin/assemble: No such file or directory". Thanks!
The PR with fix: https://github.com/openshift/source-to-image/pull/102
It's fixed, verified with the latest built sti(version 0.1, build 48cf2e9), please refer to the following results: $ sti build git://github.com/chunyunchen/sinatra-app-example chunyunchen/ruby-20-centos ccyapp -s https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts --loglevel=1 I1224 03:05:06.744477 01957 docker.go:118] Pulling image chunyunchen/ruby-20-centos I1224 03:06:22.830409 01957 executor.go:156] Downloading git://github.com/chunyunchen/sinatra-app-example to directory /tmp/sti590809755/upload/src Cloning into '/tmp/sti590809755/upload/src'... remote: Counting objects: 95, done. remote: Compressing objects: 100% (56/56), done. remote: Total 95 (delta 23), reused 95 (delta 23) Receiving objects: 100% (95/95), 10.25 KiB | 0 bytes/s, done. Resolving deltas: 100% (23/23), done. Checking connectivity... done. W1224 03:06:23.238123 01957 download.go:117] Unable to download https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble (failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/assemble, response code 404) W1224 03:06:23.273221 01957 download.go:117] Unable to download https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts (failed to retrieve https://raw.githubusercontent.com/chunyunchen/shell-ruby/master/scripts/save-artifacts, response code 404) I1224 03:06:23.277682 01957 build.go:79] Clean build will be performed Assemble file comes from app source ---> Installing application source ---> Building your Ruby application from source ---> Running 'bundle install --deployment' Fetching gem metadata from https://rubygems.org/.......... Installing rack (1.5.2) Installing puma (2.8.1) Installing rack-protection (1.5.2) Installing tilt (1.4.1) Installing sinatra (1.4.4) Using bundler (1.3.1) Your bundle is complete! It was installed into /opt/ruby/bundle ---> Cleaning up unused ruby gems Assemble file comes from app source I1224 03:06:40.921254 01957 build.go:120] Tagged 72a5bc16974b1f8436357ffa7a0fb2bb6587281294026583d4d4a08893af2c2c as ccyapp I1224 03:06:40.921286 01957 build.go:134] Successfully built ccyapp