tiktok-sparo/assets/js/83a50b44.e29b0de3.js
2024-03-01 00:41:05 -08:00

1 line
No EOL
3.8 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[712],{5009:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var i=n(678),t=n(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. 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 s={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)(s.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. 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)(s.p,{children:["Sparo provides a separate command line ",(0,i.jsx)(s.code,{children:"sparo-ci"})," that is specifically optimized for CI pipelines. The current implementation takes this approach:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["It uses ",(0,i.jsx)(s.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)(s.strong,{children:"blobless clone"}),", under the assumption that Git history will be rarely needed."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.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)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Sparse checkout is configured, and the ",(0,i.jsx)(s.a,{href:"/sparo/pages/reference/skeleton_folders",children:"skeleton folders"})," are included."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"Currently two subcommands are supported for CI:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.code,{children:"sparo-ci checkout"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.code,{children:"sparo-ci clone"})}),"\n"]})]})}function d(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},4738:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>a});var i=n(6166);const t={},r=i.createContext(t);function o(e){const s=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),i.createElement(r.Provider,{value:s},e.children)}}}]);