<metaname="description"content="common build and test rules for CSI apps. Contribute to pohly/csi-build-rules development by creating an account on GitHub.">
<meta property="og:image" content="https://avatars3.githubusercontent.com/u/22076?s=400&v=4" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="pohly/csi-build-rules" /><meta property="og:url" content="https://github.com/pohly/csi-build-rules" /><meta property="og:description" content="common build and test rules for CSI apps. Contribute to pohly/csi-build-rules development by creating an account on GitHub." />
<ahref="/features"class="py-2 lh-condensed-ultra d-block link-gray-dark no-underline h5 Bump-link--hover" data-ga-click="(Logged out) Header, go to Features">Features <span class="Bump-link-symbol float-right text-normal text-gray-light">→</span></a>
<ulclass="list-style-none f5 pb-3">
<liclass="edge-item-fix"><a href="/features/code-review/"class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Code review">Code review</a></li>
<liclass="edge-item-fix"><a href="/features/project-management/"class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Project management">Project management</a></li>
<liclass="edge-item-fix"><a href="/features/integrations"class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Integrations">Integrations</a></li>
<liclass="edge-item-fix"><a href="/features/actions"class="py-2 lh-condensed-ultra d-block link-gray" data-ga-click="(Logged out) Header, go to Actions">Actions</a>
<liclass="edge-item-fix"><a href="/features#team-management"class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Team management">Team management</a></li>
<liclass="edge-item-fix"><a href="/features#social-coding"class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Social coding">Social coding</a></li>
<liclass="edge-item-fix"><a href="/features#documentation"class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Documentation">Documentation</a></li>
<liclass="edge-item-fix"><a href="/features#code-hosting"class="py-2 lh-condensed-ultra d-block link-gray no-underline f5" data-ga-click="(Logged out) Header, go to Code hosting">Code hosting</a></li>
<pclass="col-6 mx-auto">GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.</p>
<adata-pjax="true"title="initial documentation and rules"class="message"href="/pohly/csi-build-rules/commit/c03f1084642431748376a2a921486348140b104c">initial documentation and rules</a>
<tdid="LC3"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> Licensed under the Apache License, Version 2.0 (the "License");</span></td>
<tdid="LC4"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> you may not use this file except in compliance with the License.</span></td>
<tdid="LC5"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> You may obtain a copy of the License at</span></td>
<tdid="LC9"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> Unless required by applicable law or agreed to in writing, software</span></td>
<tdid="LC10"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> distributed under the License is distributed on an "AS IS" BASIS,</span></td>
<tdid="LC11"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></td>
<tdid="LC12"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> See the License for the specific language governing permissions and</span></td>
<tdid="LC17"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> A space-separated list of all commands in the repository, must be</span></td>
<tdid="LC18"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> set in main Makefile of a repository.</span></td>
<tdid="LC21"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> This is the default. It can be overridden in the main Makefile after</span></td>
<tdid="LC25"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> Revision that gets built into each binary via the main.version</span></td>
<tdid="LC26"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> string. Uses the `git describe` output based on the most recent</span></td>
<tdid="LC27"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> version tag with a short revision suffix or, if nothing has been</span></td>
<tdid="LC30"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> Beware that tags may also be missing in shallow clones as done by</span></td>
<tdid="LC31"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> some CI systems (like TravisCI, which pulls only 50 commits).</span></td>
<tdid="LC34"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> A space-separated list of image tags under which the current build is to be pushed.</span></td>
<tdid="LC38"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> A "canary" image gets built if the current commit is the head of the remote "master" branch.</span></td>
<tdid="LC39"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> That branch does not exist when building some other branch in TravisCI.</span></td>
<tdid="LC42"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> A "X.Y.Z-canary" image gets built if the current commit is the head of a "origin/release-X.Y.Z" branch.</span></td>
<tdid="LC43"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> The actual suffix does not matter, only the "release-" prefix is checked.</span></td>
<tdid="LC46"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> A release image "vX.Y.Z" gets built if there is a tag of that format for the current commit.</span></td>
<tdid="LC47"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> --abbrev=0 suppresses long format, only showing the closest tag.</span></td>
<tdid="LC50"class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">#</span> Images are named after the command contained in them.</span></td>
<tdid="LC93"class="blob-code blob-code-inner js-file-line"> go vet <span class="pl-s"><span class="pl-pds">`</span>go list ./... <span class="pl-k">|</span> grep-v vendor<span class="pl-pds">`</span></span></td>