{"id":1265,"date":"2023-10-23T12:58:55","date_gmt":"2023-10-23T07:28:55","guid":{"rendered":"https:\/\/www.openwriteup.com\/?page_id=1265"},"modified":"2023-10-23T12:58:55","modified_gmt":"2023-10-23T07:28:55","slug":"openshift-how-to-do-build-with-binary-artifacts","status":"publish","type":"page","link":"https:\/\/www.openwriteup.com\/?page_id=1265","title":{"rendered":"Openshift: How to do build with binary artifacts"},"content":{"rendered":"<p>1) Created an image stream: (test.yaml)<\/p>\n<pre>apiVersion: image.openshift.io\/v1\r\nkind: ImageStream\r\nmetadata:\r\n name: my-docker-imagestream-jboss\r\nspec:\r\n lookupPolicy:\r\n  local: false\r\n tags:\r\n  - name: latest\r\n    from:\r\n     kind: DockerImage\r\n     name: docker.io\/freebirdie\/jboss-webserver31-tomcat8-openshift:latest<\/pre>\n<p>2) create and list the image stream<\/p>\n<pre>oc create -f test.yaml\r\n\r\noc get is<\/pre>\n<p>3) Setup a war file directory<\/p>\n<p>Create project &amp; folder structure<\/p>\n<pre>oc new-project binarydeploy\r\nmkdir binarytest &amp;&amp; cd binarytest\r\nmkdir deployments<\/pre>\n<p>4) In case want to create war sample file<\/p>\n<pre>git clone https:\/\/github.com\/boxfuse\/boxfuse-sample-java-war-hello\r\ncd boxfuse-sample-java-war-hello\r\nmvn package\r\nboxfuse run target\/hello-1.0.war\r\ncp target\/hello-1.0.war binarytest\/deployments\/ROOT.war<\/pre>\n<p>6) create buildconfig<\/p>\n<pre>oc new-build default-route-openshift-image-registry.apps-crc.testing\/binarydeploy\/my-docker-imagestream-jboss --binary=true --name=myapp --allow-missing-images<\/pre>\n<pre>cd binarytest\/deployments\r\n\r\noc start-build myapp --from-dir=.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1) Created an image stream: (test.yaml) apiVersion: image.openshift.io\/v1 kind: ImageStream metadata: name: my-docker-imagestream-jboss spec: lookupPolicy: local: false tags: &#8211; name: latest from: kind: DockerImage name: docker.io\/freebirdie\/jboss-webserver31-tomcat8-openshift:latest 2) create and list the image stream oc create -f test.yaml oc get is 3) Setup a war file directory Create project &amp; folder structure oc new-project binarydeploy mkdir [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":769,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_oct_exclude_from_cache":false,"footnotes":""},"class_list":["post-1265","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.openwriteup.com\/index.php?rest_route=\/wp\/v2\/pages\/1265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.openwriteup.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.openwriteup.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.openwriteup.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.openwriteup.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1265"}],"version-history":[{"count":1,"href":"https:\/\/www.openwriteup.com\/index.php?rest_route=\/wp\/v2\/pages\/1265\/revisions"}],"predecessor-version":[{"id":1266,"href":"https:\/\/www.openwriteup.com\/index.php?rest_route=\/wp\/v2\/pages\/1265\/revisions\/1266"}],"up":[{"embeddable":true,"href":"https:\/\/www.openwriteup.com\/index.php?rest_route=\/wp\/v2\/pages\/769"}],"wp:attachment":[{"href":"https:\/\/www.openwriteup.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}