tiktok-sparo/assets/js/83a50b44.2f1cba3b.js
2024-03-01 00:22:15 -08:00

1 line
No EOL
3.8 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[712],{5009:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var i=s(678),t=s(4738);const r={title:"Overview"},o=void 0,a={id:"pages/ci_commands/overview",title:"Overview",description:"Everyday development involves a variety of Git operations such as switching between branches, fetching incremental changes from the server, and browsing history. By contrast, when a continuous integration (CI) pipeline checks out a Git branch, it is typically a much simpler operation, and the folder or entire virtual machine image may be discarded as soon as the job completes. Therefore, different approaches for optimizing Git require required for these two use cases.",source:"@site/docs/pages/ci_commands/overview.md",sourceDirName:"pages/ci_commands",slug:"/pages/ci_commands/overview",permalink:"/sparo/pages/ci_commands/overview",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/ci_commands/overview.md",tags:[],version:"current",frontMatter:{title:"Overview"},sidebar:"docsSidebar",previous:{title:"sparo list-profiles",permalink:"/sparo/pages/commands/sparo_list-profiles"},next:{title:"sparo-ci checkout",permalink:"/sparo/pages/ci_commands/sparo-ci_checkout"}},c={},l=[];function p(e){const n={a:"a",code:"code",em:"em",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Everyday development involves a variety of Git operations such as switching between branches, fetching incremental changes from the server, and browsing history. By contrast, when a continuous integration (CI) pipeline checks out a Git branch, it is typically a much simpler operation, and the folder or entire virtual machine image may be discarded as soon as the job completes. Therefore, different approaches for optimizing Git require required for these two use cases."}),"\n",(0,i.jsxs)(n.p,{children:["Sparo provides a separate command line ",(0,i.jsx)(n.code,{children:"sparo-ci"})," that is specifically optimized for CI pipelines. The current implementation takes this approach:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["It uses ",(0,i.jsx)(n.a,{href:"https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/",children:"treeless clone"})," instead of ",(0,i.jsx)(n.strong,{children:"blobless clone"}),", under the assumption that Git history will be rarely needed."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.em,{children:"Shallow clone is a common alternative, however it has trouble supporting operations such as incremental build or publishing that require comparison with a base branch."})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Spare checkout is configured, and the ",(0,i.jsx)(n.a,{href:"/sparo/pages/reference/skeleton_folders",children:"skeleton folders"})," are included."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Currently two subcommands are supported for CI:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"sparo-ci checkout"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"sparo-ci clone"})}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},4738:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var i=s(6166);const t={},r=i.createContext(t);function o(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]);