1"use strict";(globalThis.webpackChunkshipwright_io_website=globalThis.webpackChunkshipwright_io_website||[]).push([[1760],{9912(e,i,s){s.r(i),s.d(i,{assets:()=>o,contentTitle:()=>l,default:()=>u,frontMatter:()=>a,metadata:()=>r,toc:()=>h});var r=s(7814),t=s(4848),n=s(8453);const a={title:"Shipwright v0.8.0 Is Here",date:new Date("2022-02-02T01:36:00.000Z"),slug:"shipwright-v0.8.0-is-here",authors:["qu1queee"],tags:["shipwright","release"]},l=void 0,o={authorsImageUrls:[void 0]},h=[{value:"Features",id:"features",level:2},{value:"Array support in Parameters",id:"array-support-in-parameters",level:3},{value:"Surfacing Errors in the BuildRun Status",id:"surfacing-errors-in-the-buildrun-status",level:3},{value:"Local Source Upload",id:"local-source-upload",level:3},{value:"Installing Shipwright",id:"installing-shipwright",level:2},{value:"Build",id:"build",level:3},{value:"SHP CLI",id:"shp-cli",level:3},{value:"Windows",id:"windows",level:4},{value:"Mac",id:"mac",level:4},{value:"Linux",id:"linux",level:4},{value:"Operator",id:"operator",level:3}];function d(e){const i={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,n.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(i.p,{children:["So, you have heard great things about Shipwright last year and you are ready for more? We are starting the year with our ",(0,t.jsx)(i.a,{href:"https://github.com/shipwright-io/build/releases/tag/v0.8.0",children:"v0.8.0"}),", and here is a list of the most relevant things you should know."]}),"\n",(0,t.jsx)(i.h2,{id:"features",children:"Features"}),"\n",(0,t.jsxs)(i.p,{children:["As promised in the ",(0,t.jsx)(i.a,{href:"/blog/shipwright-v0.7.0-is-here",children:"v0.7.0"})," blog post, we closed last year developing three interesting features."]}),"\n",(0,t.jsx)(i.h3,{id:"array-support-in-parameters",children:"Array support in Parameters"}),"\n",(0,t.jsxs)(i.p,{children:["We introduced an extension to the ",(0,t.jsx)(i.strong,{children:"parameter"})," feature, by allowing users to define parameters in the form of a list. A list can be composed of values from secrets, configmaps or plain values."]}),"\n",(0,t.jsxs)(i.p,{children:["Our main driver was the support for ",(0,t.jsx)(i.a,{href:"https://docs.docker.com/engine/reference/builder/#using-arg-variables",children:"ARGS"})," in Dockerfiles. This allows users to further ",(0,t.jsx)(i.a,{href:"https://github.com/shipwright-io/sample-go/blob/main/docker-build-with-args/Dockerfile",children:"customize"})," their builds, by specifying variables that are available to the ",(0,t.jsx)(i.code,{children:"RUN"})," command."]}),"\n",(0,t.jsxs)(i.p,{children:["In addition, being able to use primitive resources (",(0,t.jsx)(i.em,{children:"such as secrets and configmaps"}),") to store key-values, allows users to protect confidential data or to share data when defining parameters values in their ",(0,t.jsx)(i.code,{children:"Builds"})," or ",(0,t.jsx)(i.code,{children:"BuildRuns"}),"."]}),"\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.strong,{children:"Note"}),": For more details on this, please see the ",(0,t.jsx)(i.a,{href:"https://github.com/shipwright-io/build/blob/v0.8.0/docs/buildstrategies.md#strategy-parameters",children:"docs"}),"."]}),"\n",(0,t.jsx)(i.h3,{id:"surfacing-errors-in-the-buildrun-status",children:"Surfacing Errors in the BuildRun Status"}),"\n",(0,t.jsxs)(i.p,{children:["Surfacing errors from different containers can be a challenging task, not because of technicality, but rather the question of the best way to represent the state. In case of ",(0,t.jsx)(i.em,{children:"failure"})," or ",(0,t.jsx)(i.em,{children:"success"})," during execution, we surface the state under the ",(0,t.jsx)(i.code,{children:".status"})," subresource of a ",(0,t.jsx)(i.code,{children:"BuildRun"}),"."]}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-yaml",children:"apiVersion: shipwright.io/v1alpha1\nkind: BuildRun\n# [...]\nstatus:\n # [...]\n failureDetails:\n location:\n container: step-source-default\n pod: baran-build-buildrun-gzmv5-b7wbf-pod-bbpqr\n message: The source repository does not exist, or you have insufficient permission\n to access it.\n reason: GitRemotePrivate\n"})}),"\n",(0,t.jsxs)(i.p,{children:["In this release we concentrated on improving the state of errors that occur during the cloning of ",(0,t.jsx)(i.em,{children:"git"}
1)," repositories, by introducing ",(0,t.jsx)(i.code,{children:".status.failureDetails"})," field. This provides further details on why ",(0,t.jsx)(i.code,{children:"step-source-default"})," failed."]}),"\n",(0,t.jsxs)(i.p,{children:["In addition, this feature ",(0,t.jsx)(i.a,{href:"https://github.com/shipwright-io/build/blob/v0.8.0/docs/buildstrategies.md#system-results",children:"enables"})," Build Strategy Authors to signalize what to surface under ",(0,t.jsx)(i.code,{children:".status.failureDetails.reason"})," and ",(0,t.jsx)(i.code,{children:".status.failureDetails.message"}),", in case a container terminates with a non-zero exit code. We will be gradually adopting this capability in our strategies, at the moment it is only used in the Buildkit ",(0,t.jsx)(i.a,{href:"https://github.com/shipwright-io/build/blob/v0.8.0/samples/buildstrategy/buildkit/buildstrategy_buildkit_cr.yaml#L96-L97",children:"strategy"}),"."]}),"\n",(0,t.jsx)(i.p,{children:(0,t.jsxs)(i.em,{children:["Now you do not need to worry if you have git misconfigurations in your ",(0,t.jsx)(i.code,{children:"Builds"}),", we got you covered!"]})}),"\n",(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.strong,{children:"Note"}),": For more details, please see the ",(0,t.jsx)(i.a,{href:"https://github.com/shipwright-io/build/blob/main/docs/buildrun.md#understanding-failed-buildruns",children:"docs"}),"."]}),"\n",(0,t.jsx)(i.h3,{id:"local-source-upload",children:"Local Source Upload"}),"\n",(0,t.jsxs)(i.p,{children:["At Shipwright, we've spent a lot of time trying to figure out the best ways to simplify the experience when building container images. In this release we are introducing a new feature that dramatically improves it, we call it ",(0,t.jsx)(i.strong,{children:"Local Source Upload"})," ."]}),"\n",(0,t.jsxs)(i.p,{children:["This feature allows users to build container images from their local source code, improving the developer experience and moving them closer to the inner dev loop (",(0,t.jsx)(i.em,{children:"single developer workflow"}),")."]}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-bash",children:'$ shp build upload -h\n\nCreates a new BuildRun instance and instructs the Build Controller to wait for the data streamed,\ninstead of executing "git clone". Therefore, you can employ Shipwright Builds from a local repository\nclone.\n\nThe upload skips the ".git" directory completely, and it follows the ".gitignore" directives, when\nthe file is found at the root of the directory uploaded.\n\n $ shp buildrun upload <build-name>\n $ shp buildrun upload <build-name> /path/to/repository\n\nUsage:\n shp build upload <build-name> [path/to/source|.] [flags]\n'})}),"\n",(0,t.jsxs)(i.p,{children:["Go ahead and give it a try! The feature is now available in the ",(0,t.jsx)(i.a,{href:"https://github.com/shipwright-io/cli/releases/tag/v0.8.0",children:"v0.8.0"})," cli, look for ",(0,t.jsx)(i.code,{children:"shp build upload"}),"!"]}),"\n",(0,t.jsx)(i.h2,{id:"installing-shipwright",children:"Installing Shipwright"}),"\n",(0,t.jsx)(i.h3,{id:"build",children:"Build"}),"\n",(0,t.jsxs)(i.ol,{children:["\n",(0,t.jsxs)(i.li,{children:["\n",(0,t.jsx)(i.p,{children:"Install Tekton v0.30.1"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-bash",children:"kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.30.1/release.yaml\n\n"})}),"\n"]}),"\n",(0,t.jsxs)(i.li,{children:["\n",(0,t.jsx)(i.p,{children:"Install v0.8.0 using the release YAML manifest:"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-bash",children:"kubectl apply -f https://github.com/shipwright-io/build/releases/download/v0.8.0/release.yaml\n"})}),"\n"]}),"\n",(0,t.jsxs)(i.li,{children:["\n",(0,t.jsx)(i.p,{children:"(Optionally) Install the sample build strategies using the YAML manifest:"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-bash",children:"kubectl apply -f https://github.com/shipwright-io/build/releases/download/v0.8.0/sample-strategies.yaml\n"})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(i.h3,{id:"shp-cli",children:"SHP CLI"}),"\n",(0,t.jsx)(i.h4,{id:"windows",children:"Windows"}
1),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-bash",children:"curl --silent --fail --location https://github.com/shipwright-io/cli/releases/download/v0.8.0/cli_0.8.0_windows_x86_64.tar.gz | tar xzf - shp.exe\nshp help\n"})}),"\n",(0,t.jsx)(i.h4,{id:"mac",children:"Mac"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-bash",children:"curl --silent --fail --location https://github.com/shipwright-io/cli/releases/download/v0.8.0/cli_0.8.0_macOS_x86_64.tar.gz | tar -xzf - -C /usr/local/bin shp\nshp help\n"})}),"\n",(0,t.jsx)(i.h4,{id:"linux",children:"Linux"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-bash",children:"curl --silent --fail --location \"https://github.com/shipwright-io/cli/releases/download/v0.8.0/cli_0.8.0_linux_$(uname -m | sed 's/aarch64/arm64/').tar.gz\" | sudo tar -xzf - -C /usr/bin shp\nshp help\n"})}),"\n",(0,t.jsx)(i.h3,{id:"operator",children:"Operator"}),"\n",(0,t.jsxs)(i.p,{children:["To deploy and manage Shipwright Builds in your cluster, first make sure the operator v0.8.0 is installed and running on your cluster. You can follow the instructions on ",(0,t.jsx)(i.a,{href:"https://operatorhub.io/operator/shipwright-operator",children:"OperatorHub"}),"."]}),"\n",(0,t.jsx)(i.p,{children:"Next, create the following:"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-yaml",children:"---\napiVersion: operator.shipwright.io/v1alpha1\nkind: ShipwrightBuild\nmetadata:\n name: shipwright-operator\nspec:\n targetNamespace: shipwright-build\n"})})]})}function u(e={}){const{wrapper:i}={...(0,n.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453(e,i,s){s.d(i,{R:()=>a,x:()=>l});var r=s(6540);const t={},n=r.createContext(t);function a(e){const i=r.useContext(n);return r.useMemo(function(){return"function"==typeof e?e(i):{...i,...e}},[i,e])}function l(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(n.Provider,{value:i},e.children)}},7814(e){e.exports=JSON.parse('{"permalink":"/blog/shipwright-v0.8.0-is-here","editUrl":"https://github.com/facebook/docusaurus/tree/main/blog/blog/2022-02-01-shipwright-v0.8.0-is-here.md","source":"@site/blog/2022-02-01-shipwright-v0.8.0-is-here.md","title":"Shipwright v0.8.0 Is Here","description":"So, you have heard great things about Shipwright last year and you are ready for more? We are starting the year with our v0.8.0, and here is a list of the most relevant things you should know.","date":"2022-02-02T01:36:00.000Z","tags":[{"inline":true,"label":"shipwright","permalink":"/blog/tags/shipwright"},{"inline":true,"label":"release","permalink":"/blog/tags/release"}],"readingTime":4.14,"hasTruncateMarker":true,"authors":[{"name":"Enrique Encalada","title":"Shipwright Maintainer","url":"https://github.com/qu1queee","socials":{"github":"https://github.com/qu1queee"},"imageURL":"https://github.com/qu1queee.png","key":"qu1queee","page":null}],"frontMatter":{"title":"Shipwright v0.8.0 Is Here","date":"2022-02-02T01:36:00.000Z","slug":"shipwright-v0.8.0-is-here","authors":["qu1queee"],"tags":["shipwright","release"]},"unlisted":false,"prevItem":{"title":"Shipwright v0.9.0 Is Here","permalink":"/blog/shipwright-v0.9.0-is-here"},"nextItem":{"title":"Shipwright v0.7.0 Is Here","permalink":"/blog/shipwright-v0.7.0-is-here"}}')}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.