New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails using odo create openjdk-1.8 command with parameter --binary #511
Comments
BuildConfig is not there for building the application. It is just injecting supervisord into s2i image. So we can keep it constantly running without the need to restart the whole container after each application rebuild. |
This is what I'm doing as I provide the jar file generated locally --> So what is then wrong ? How can odo create correctly the BuildConfig which should be equal to this one - https://goo.gl/MwGuLJ ? @kadel |
When creating odo component that uses binary (or local directory) as a source BuildConfig is not needed, everything happens directly in the running container without triggering BuildConfig. BuildConfig is there only for initializing new component but it is not used afterward. The problem in this case is that The current way how we inject SupervisorD process to s2i images (we need this to make |
So for the moment, As i can imagine that |
For some builder images, like openjdk one used in this case, yes :-( |
Some discussion related to this is in #445 |
So this works with wildfly, but obviously we want it to work with the openjdk18 images. How do you think we could proceed with that? I have a feeling we'll have to update our supervisord image to correctly detect and use the Output of testing with wildfly located below: github.com/redhat-developer/odo master ✔ 4h6m ⍉
▶ ./odo create wildfly --binary ~/ocp-fmp-build-install/target/ocp-fmp-build-install-1.0-exec.jar
Component 'ocp-fmp-buil-wildfly-jlpd' was created and port 8080/TCP was opened
To push source code to the component run 'odo push'
Component 'ocp-fmp-buil-wildfly-jlpd' is now set as active component.
github.com/redhat-developer/odo master ✔ 4h6m
▶ ./odo push
Pushing changes to component: ocp-fmp-buil-wildfly-jlpd
^C
github.com/redhat-developer/odo master ✔ 4h6m ⍉
▶ ./odo push -v 4
I1023 14:52:07.397731 10868 occlient.go:265] Trying to connect to server 192.168.42.174:8443
I1023 14:52:07.398051 10868 occlient.go:271] Server https://192.168.42.174:8443 is up
I1023 14:52:07.409522 10868 occlient.go:248] isLoggedIn err: <nil>
output: "developer"
I1023 14:52:07.410235 10868 push.go:45] No component name passed, assuming current component
Pushing changes to component: ocp-fmp-buil-wildfly-jlpd
I1023 14:52:07.410913 10868 occlient.go:1909] Getting DeploymentConfig: ocp-fmp-buil-wildfly-jlpd-odo-lfwi
I1023 14:52:07.433164 10868 component.go:476] Source for component ocp-fmp-buil-wildfly-jlpd is file:///home/wikus/ocp-fmp-build-install/target/ocp-fmp-build-install-1.0-exec.jar (binary)
I1023 14:52:07.433195 10868 push.go:97] Copying file /home/wikus/ocp-fmp-build-install/target/ocp-fmp-build-install-1.0-exec.jar to pod
I1023 14:52:07.449001 10868 occlient.go:1110] Waiting for deploymentconfig=ocp-fmp-buil-wildfly-jlpd-odo-lfwi pod
I1023 14:52:07.463865 10868 occlient.go:1125] Status of ocp-fmp-buil-wildfly-jlpd-odo-lfwi-1-t6z8z pod is Pending
I1023 14:52:07.664299 10868 occlient.go:1125] Status of ocp-fmp-buil-wildfly-jlpd-odo-lfwi-1-t6z8z pod is Running
I1023 14:52:07.664313 10868 occlient.go:1128] Pod ocp-fmp-buil-wildfly-jlpd-odo-lfwi-1-t6z8z is running.
I1023 14:52:07.664333 10868 component.go:343] Copying to pod ocp-fmp-buil-wildfly-jlpd-odo-lfwi-1-t6z8z
jPlease wait, building component....
+ set -eo pipefail
+ '[' -f /opt/app-root/src/.s2i/bin/assemble ']'
+ '[' -f /usr/local/s2i/assemble ']'
+ /usr/libexec/s2i/assemble
cp: cannot stat '/opt/s2i/destination/src/.': No such file or directory
Moving binaries in source directory into /wildfly/standalone/deployments for later deployment...
Moving all war artifacts from /opt/app-root/src/. directory into /wildfly/standalone/deployments for later deployment...
Moving all ear artifacts from /opt/app-root/src/. directory into /wildfly/standalone/deployments for later deployment...
Moving all rar artifacts from /opt/app-root/src/. directory into /wildfly/standalone/deployments for later deployment...
Moving all jar artifacts from /opt/app-root/src/. directory into /wildfly/standalone/deployments for later deployment...
'/opt/app-root/src/./ocp-fmp-build-install-1.0-exec.jar' -> '/wildfly/standalone/deployments/ocp-fmp-build-install-1.0-exec.jar'
removed '/opt/app-root/src/./ocp-fmp-build-install-1.0-exec.jar'
'/opt/app-root/src/./ocp-fmp-build-install-1.0.jar' -> '/wildfly/standalone/deployments/ocp-fmp-build-install-1.0.jar'
removed '/opt/app-root/src/./ocp-fmp-build-install-1.0.jar'
...done
+ /var/lib/supervisord/bin/supervisord ctl stop run
run: stopped
+ /var/lib/supervisord/bin/supervisord ctl start run
run: started
changes successfully pushed to component: ocp-fmp-buil-wildfly-jlpd
I1023 14:52:10.585396 10868 root.go:119] Could not get the latest release information in time. Never mind, exiting gracefully :)
github.com/redhat-developer/odo master ✔ 4h6m
▶ ./odo url create
Adding URL to component: ocp-fmp-buil-wildfly-jlpd
URL created for component: ocp-fmp-buil-wildfly-jlpd
ocp-fmp-buil-wildfly-jlpd - http://ocp-fmp-buil-wildfly-jlpd-odo-lfwi-myproject.192.168.42.174.nip.io |
According to the command doc, we can create a component and the buildConfig if we pass as parameter by example
--binary
Unfortunately, that will fail if we use this command as s2i build will use the python s2i docker image
BuildConfig fil;e generated is
I'm expecting that a SourceStream Binary strategy will be used here and not git as source.
The text was updated successfully, but these errors were encountered: