Use java S2I for spring boot app with gradle build in openshift












0















How to get started with java S2I build for spring boot application with Gradle build?



Please suggest me any Json/yml file needs to be imported to get started.










share|improve this question





























    0















    How to get started with java S2I build for spring boot application with Gradle build?



    Please suggest me any Json/yml file needs to be imported to get started.










    share|improve this question



























      0












      0








      0


      1






      How to get started with java S2I build for spring boot application with Gradle build?



      Please suggest me any Json/yml file needs to be imported to get started.










      share|improve this question
















      How to get started with java S2I build for spring boot application with Gradle build?



      Please suggest me any Json/yml file needs to be imported to get started.







      spring-boot gradle openshift






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 24 '18 at 16:21









      James Z

      11.2k71935




      11.2k71935










      asked Nov 24 '18 at 10:36









      PrashPrash

      313515




      313515
























          1 Answer
          1






          active

          oldest

          votes


















          1














          Here is a whole repo - https://github.com/dsevost/gradle-s2i - with a Dockerfile to build a S2I gradle builder image, and a template to build applications on top of it.



          Perhaps it is worth noting the BUILDER parameter in the template with possible values of 'Gradle' or 'Maven'. According to the assemble script, it will build a gradle project even when both pom.xml and build.gradle are present in the project directory.



          I haven't tried it myself but I glanced over the template and it looks OK...assuming the image and S2I scripts are functional.






          share|improve this answer
























          • Thank you. Just to glance I can copy past the YML into openshift yml/JSON importer and can start the S2I build? If it isn't too much to ask, do you mind helping me how to get it done from scratch since I am novice openshift user?

            – Prash
            Nov 26 '18 at 2:59













          • I really need serious help, Please guide me on the same and I can't understand the repo files.

            – Prash
            Nov 26 '18 at 7:07











          • Hi @Prash. Assuming you have proper access to an OpenShift cluster, run one time only the commands described under github.com/dsevost/gradle-s2i#build-from-scratch up to and including oc new-build...; this will build a new builder image you can use as base for your gradle-built apps. For every app you want to build, replace in the oc new-app... command that follows the arguments as appropriate - oc new-app -h will list all options. Don't execute the last oc new-app...BUILDER=maven... command - that is to build an app using maven.

            – apisim
            Nov 26 '18 at 15:17











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457276%2fuse-java-s2i-for-spring-boot-app-with-gradle-build-in-openshift%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Here is a whole repo - https://github.com/dsevost/gradle-s2i - with a Dockerfile to build a S2I gradle builder image, and a template to build applications on top of it.



          Perhaps it is worth noting the BUILDER parameter in the template with possible values of 'Gradle' or 'Maven'. According to the assemble script, it will build a gradle project even when both pom.xml and build.gradle are present in the project directory.



          I haven't tried it myself but I glanced over the template and it looks OK...assuming the image and S2I scripts are functional.






          share|improve this answer
























          • Thank you. Just to glance I can copy past the YML into openshift yml/JSON importer and can start the S2I build? If it isn't too much to ask, do you mind helping me how to get it done from scratch since I am novice openshift user?

            – Prash
            Nov 26 '18 at 2:59













          • I really need serious help, Please guide me on the same and I can't understand the repo files.

            – Prash
            Nov 26 '18 at 7:07











          • Hi @Prash. Assuming you have proper access to an OpenShift cluster, run one time only the commands described under github.com/dsevost/gradle-s2i#build-from-scratch up to and including oc new-build...; this will build a new builder image you can use as base for your gradle-built apps. For every app you want to build, replace in the oc new-app... command that follows the arguments as appropriate - oc new-app -h will list all options. Don't execute the last oc new-app...BUILDER=maven... command - that is to build an app using maven.

            – apisim
            Nov 26 '18 at 15:17
















          1














          Here is a whole repo - https://github.com/dsevost/gradle-s2i - with a Dockerfile to build a S2I gradle builder image, and a template to build applications on top of it.



          Perhaps it is worth noting the BUILDER parameter in the template with possible values of 'Gradle' or 'Maven'. According to the assemble script, it will build a gradle project even when both pom.xml and build.gradle are present in the project directory.



          I haven't tried it myself but I glanced over the template and it looks OK...assuming the image and S2I scripts are functional.






          share|improve this answer
























          • Thank you. Just to glance I can copy past the YML into openshift yml/JSON importer and can start the S2I build? If it isn't too much to ask, do you mind helping me how to get it done from scratch since I am novice openshift user?

            – Prash
            Nov 26 '18 at 2:59













          • I really need serious help, Please guide me on the same and I can't understand the repo files.

            – Prash
            Nov 26 '18 at 7:07











          • Hi @Prash. Assuming you have proper access to an OpenShift cluster, run one time only the commands described under github.com/dsevost/gradle-s2i#build-from-scratch up to and including oc new-build...; this will build a new builder image you can use as base for your gradle-built apps. For every app you want to build, replace in the oc new-app... command that follows the arguments as appropriate - oc new-app -h will list all options. Don't execute the last oc new-app...BUILDER=maven... command - that is to build an app using maven.

            – apisim
            Nov 26 '18 at 15:17














          1












          1








          1







          Here is a whole repo - https://github.com/dsevost/gradle-s2i - with a Dockerfile to build a S2I gradle builder image, and a template to build applications on top of it.



          Perhaps it is worth noting the BUILDER parameter in the template with possible values of 'Gradle' or 'Maven'. According to the assemble script, it will build a gradle project even when both pom.xml and build.gradle are present in the project directory.



          I haven't tried it myself but I glanced over the template and it looks OK...assuming the image and S2I scripts are functional.






          share|improve this answer













          Here is a whole repo - https://github.com/dsevost/gradle-s2i - with a Dockerfile to build a S2I gradle builder image, and a template to build applications on top of it.



          Perhaps it is worth noting the BUILDER parameter in the template with possible values of 'Gradle' or 'Maven'. According to the assemble script, it will build a gradle project even when both pom.xml and build.gradle are present in the project directory.



          I haven't tried it myself but I glanced over the template and it looks OK...assuming the image and S2I scripts are functional.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 25 '18 at 0:06









          apisimapisim

          4926




          4926













          • Thank you. Just to glance I can copy past the YML into openshift yml/JSON importer and can start the S2I build? If it isn't too much to ask, do you mind helping me how to get it done from scratch since I am novice openshift user?

            – Prash
            Nov 26 '18 at 2:59













          • I really need serious help, Please guide me on the same and I can't understand the repo files.

            – Prash
            Nov 26 '18 at 7:07











          • Hi @Prash. Assuming you have proper access to an OpenShift cluster, run one time only the commands described under github.com/dsevost/gradle-s2i#build-from-scratch up to and including oc new-build...; this will build a new builder image you can use as base for your gradle-built apps. For every app you want to build, replace in the oc new-app... command that follows the arguments as appropriate - oc new-app -h will list all options. Don't execute the last oc new-app...BUILDER=maven... command - that is to build an app using maven.

            – apisim
            Nov 26 '18 at 15:17



















          • Thank you. Just to glance I can copy past the YML into openshift yml/JSON importer and can start the S2I build? If it isn't too much to ask, do you mind helping me how to get it done from scratch since I am novice openshift user?

            – Prash
            Nov 26 '18 at 2:59













          • I really need serious help, Please guide me on the same and I can't understand the repo files.

            – Prash
            Nov 26 '18 at 7:07











          • Hi @Prash. Assuming you have proper access to an OpenShift cluster, run one time only the commands described under github.com/dsevost/gradle-s2i#build-from-scratch up to and including oc new-build...; this will build a new builder image you can use as base for your gradle-built apps. For every app you want to build, replace in the oc new-app... command that follows the arguments as appropriate - oc new-app -h will list all options. Don't execute the last oc new-app...BUILDER=maven... command - that is to build an app using maven.

            – apisim
            Nov 26 '18 at 15:17

















          Thank you. Just to glance I can copy past the YML into openshift yml/JSON importer and can start the S2I build? If it isn't too much to ask, do you mind helping me how to get it done from scratch since I am novice openshift user?

          – Prash
          Nov 26 '18 at 2:59







          Thank you. Just to glance I can copy past the YML into openshift yml/JSON importer and can start the S2I build? If it isn't too much to ask, do you mind helping me how to get it done from scratch since I am novice openshift user?

          – Prash
          Nov 26 '18 at 2:59















          I really need serious help, Please guide me on the same and I can't understand the repo files.

          – Prash
          Nov 26 '18 at 7:07





          I really need serious help, Please guide me on the same and I can't understand the repo files.

          – Prash
          Nov 26 '18 at 7:07













          Hi @Prash. Assuming you have proper access to an OpenShift cluster, run one time only the commands described under github.com/dsevost/gradle-s2i#build-from-scratch up to and including oc new-build...; this will build a new builder image you can use as base for your gradle-built apps. For every app you want to build, replace in the oc new-app... command that follows the arguments as appropriate - oc new-app -h will list all options. Don't execute the last oc new-app...BUILDER=maven... command - that is to build an app using maven.

          – apisim
          Nov 26 '18 at 15:17





          Hi @Prash. Assuming you have proper access to an OpenShift cluster, run one time only the commands described under github.com/dsevost/gradle-s2i#build-from-scratch up to and including oc new-build...; this will build a new builder image you can use as base for your gradle-built apps. For every app you want to build, replace in the oc new-app... command that follows the arguments as appropriate - oc new-app -h will list all options. Don't execute the last oc new-app...BUILDER=maven... command - that is to build an app using maven.

          – apisim
          Nov 26 '18 at 15:17




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53457276%2fuse-java-s2i-for-spring-boot-app-with-gradle-build-in-openshift%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Ottavio Pratesi

          Tricia Helfer

          15 giugno