296 lines
8.7 KiB
HTML
296 lines
8.7 KiB
HTML
<!doctype html>
|
||
<html lang='en' class='no-js '>
|
||
<head>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<meta charset='utf-8'>
|
||
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
|
||
<link href='./assets/favicon.png' rel='shortcut icon'>
|
||
<meta content='/circle.html' name='app:pageurl'>
|
||
|
||
|
||
<title>CircleCI cheatsheet</title>
|
||
<meta content='CircleCI cheatsheet' property='og:title'>
|
||
<meta content='CircleCI cheatsheet' property='twitter:title'>
|
||
<meta content='article' property='og:type'>
|
||
|
||
|
||
|
||
<meta content='https://assets.devhints.io/previews/circle.jpg?t=20200623143612' property='og:image'>
|
||
<meta content='https://assets.devhints.io/previews/circle.jpg?t=20200623143612' property='twitter:image'>
|
||
<meta content='900' property='og:image:width'>
|
||
<meta content='471' property='og:image:height'>
|
||
|
||
|
||
|
||
<meta content="The one-page guide to CircleCI: usage, examples, links, snippets, and more." name="description">
|
||
<meta content="The one-page guide to CircleCI: usage, examples, links, snippets, and more." property="og:description">
|
||
<meta content="The one-page guide to CircleCI: usage, examples, links, snippets, and more." property="twitter:description">
|
||
|
||
|
||
<link rel="canonical" href="https://devhints.io/circle">
|
||
<meta name="og:url" content="https://devhints.io/circle">
|
||
|
||
|
||
|
||
|
||
|
||
<meta content='Devhints.io cheatsheets' property='og:site_name'>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<meta content='Devops' property='article:section'>
|
||
|
||
|
||
|
||
|
||
|
||
<script async src='https://www.googletagmanager.com/gtag/js?id=UA-106902774-1'></script>
|
||
<script>
|
||
|
||
window.dataLayer=window.dataLayer||[];
|
||
function gtag(){dataLayer.push(arguments)};
|
||
gtag('js',new Date());
|
||
gtag('config','UA-106902774-1');
|
||
</script>
|
||
|
||
|
||
|
||
<meta property='page:depth' content='1'>
|
||
|
||
|
||
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
|
||
<script>(function(H){H.className=H.className.replace(/\bNoJs\b/,'WithJs')})(document.documentElement)</script>
|
||
|
||
<script>(function(d,s){if(window.Promise&&[].includes&&Object.assign&&window.Map)return;var js,sc=d.getElementsByTagName(s)[0];js=d.createElement(s);js.src='https://cdn.polyfill.io/v2/polyfill.min.js';sc.parentNode.insertBefore(js, sc);}(document,'script'))</script>
|
||
|
||
<!--[if lt IE 9]><script src='https://cdnjs.cloudflare.com/ajax/libs/nwmatcher/1.2.5/nwmatcher.min.js'></script><script src='https://cdnjs.cloudflare.com/ajax/libs/json2/20140204/json2.js'></script><script src='https://cdn.rawgit.com/gisu/selectivizr/1.0.3/selectivizr.js'></script><script src='https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js'></script><script src='https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js'></script><![endif]-->
|
||
|
||
<style>html{opacity:0}</style>
|
||
<link rel="stylesheet" href="./assets/2015/style.css?t=20200623143612">
|
||
<link href="./assets/style.css?t=20200623143612" rel="stylesheet" />
|
||
<link href="./assets/print.css?t=20200623143612" rel="stylesheet" media="print" />
|
||
</head>
|
||
<body>
|
||
<div class='all'>
|
||
|
||
<div class='site-header'>
|
||
<div class='container'>
|
||
This is <a href="."><em>Devhints.io cheatsheets</em></a> — a collection of cheatsheets I've written.
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<script type='application/ld+json'>
|
||
{
|
||
"@context": "http://schema.org",
|
||
"@type": "NewsArticle",
|
||
"mainEntityOfPage": {
|
||
"@type": "WebPage",
|
||
"@id": "https://google.com/article"
|
||
},
|
||
"headline": "CircleCI cheatsheet",
|
||
"image": [ "https://assets.devhints.io/previews/circle.jpg?t=20200623143612" ],
|
||
"description": "The one-page guide to CircleCI: usage, examples, links, snippets, and more."
|
||
}
|
||
</script>
|
||
<script type='application/ld+json'>
|
||
{
|
||
"@context": "http://schema.org",
|
||
"@type": "BreadcrumbList",
|
||
"itemListElement": [{
|
||
"@type": "ListItem",
|
||
"position": 1,
|
||
"item": {
|
||
"@id": "https://devhints.io/#devops",
|
||
"name": "Devops"
|
||
}
|
||
},{
|
||
"@type": "ListItem",
|
||
"position": 2,
|
||
"item": {
|
||
"@id": "https://devhints.io/circle",
|
||
"name": "CircleCI"
|
||
}
|
||
}]
|
||
}
|
||
</script>
|
||
|
||
|
||
<div class='post-list -single -cheatsheet'>
|
||
<div class='post-item'>
|
||
<div class='post-headline -cheatsheet'>
|
||
<p class='prelude'><span></span></p>
|
||
<h1><span>CircleCI</span></h1>
|
||
|
||
<ul class="social-list ">
|
||
<li class="facebook link hint--bottom" data-hint="Share on Facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=https://devhints.io/circle.html" target="share"><span class="text"></span></a></li>
|
||
<li class="twitter link hint--bottom" data-hint="Share on Twitter"><a href="https://twitter.com/intent/tweet?text=The%20ultimate%20cheatsheet%20for%20CircleCI.%20https://devhints.io/circle.html" target="share"><span class="text"></span></a></li>
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
<div class='post-content -cheatsheet'>
|
||
<h2 id="circleyml">circle.yml</h2>
|
||
|
||
<ul>
|
||
<li><strong>machine</strong>: adjusting the VM to your preferences and requirements</li>
|
||
<li><strong>checkout</strong>: checking out and cloning your git repo</li>
|
||
<li><strong>dependencies</strong>: setting up your project’s language-specific dependencies</li>
|
||
<li><strong>database</strong>: preparing the databases for your tests</li>
|
||
<li><strong>test</strong>: running your tests</li>
|
||
<li><strong>deployment</strong>: deploying your code to your web servers</li>
|
||
</ul>
|
||
|
||
<p>See: <a href="https://circleci.com/docs/configuration">https://circleci.com/docs/configuration</a></p>
|
||
|
||
<h2 id="sample">Sample</h2>
|
||
|
||
<pre><code class="language-yml">## Customize the test machine
|
||
machine:
|
||
|
||
timezone:
|
||
America/Los_Angeles # Set the timezone
|
||
|
||
# Version of ruby to use
|
||
ruby:
|
||
version:
|
||
1.8.7-p358-falcon-perf
|
||
|
||
# Override /etc/hosts
|
||
hosts:
|
||
circlehost: 127.0.0.1
|
||
dev.mycompany.com: 127.0.0.1
|
||
|
||
# Add some environment variables
|
||
environment:
|
||
CIRCLE_ENV: test
|
||
DATABASE_URL: postgres://ubuntu:@127.0.0.1:5432/circle_test
|
||
|
||
## Customize checkout
|
||
checkout:
|
||
post:
|
||
- git submodule sync
|
||
- git submodule update --init # use submodules
|
||
|
||
## Customize dependencies
|
||
dependencies:
|
||
pre:
|
||
- npm install coffeescript # install from a different package manager
|
||
- gem uninstall bundler # use a custom version of bundler
|
||
- gem install bundler --pre
|
||
|
||
override:
|
||
- bundle install: # note ':' here
|
||
timeout: 180 # fail if command has no output for 3 minutes
|
||
|
||
# we automatically cache and restore many dependencies between
|
||
# builds. If you need to, you can add custom paths to cache:
|
||
cache_directories:
|
||
- "custom_1" # relative to the build directory
|
||
- "~/custom_2" # relative to the user's home directory
|
||
|
||
## Customize database setup
|
||
database:
|
||
override:
|
||
# replace CircleCI's generated database.yml
|
||
- cp config/database.yml.ci config/database.yml
|
||
- bundle exec rake db:create db:schema:load
|
||
|
||
## Customize test commands
|
||
test:
|
||
override:
|
||
- phpunit test/unit-tests # use PHPunit for testing
|
||
post:
|
||
- bundle exec rake jasmine:ci: # add an extra test type
|
||
environment:
|
||
RAILS_ENV: test
|
||
RACK_ENV: test
|
||
|
||
## Customize deployment commands
|
||
deployment:
|
||
staging:
|
||
branch: master
|
||
heroku:
|
||
appname: foo-bar-123
|
||
|
||
## Custom notifications
|
||
notify:
|
||
webhooks:
|
||
# A list of hashes representing hooks. Only the url field is supported.
|
||
- url: https://someurl.com/hooks/circle
|
||
</code></pre>
|
||
|
||
<p>See: <a href="https://circleci.com/docs/config-sample">https://circleci.com/docs/config-sample</a></p>
|
||
|
||
</div>
|
||
|
||
|
||
<ul class="social-list ">
|
||
<li class="facebook link hint--bottom" data-hint="Share on Facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=https://devhints.io/circle.html" target="share"><span class="text"></span></a></li>
|
||
<li class="twitter link hint--bottom" data-hint="Share on Twitter"><a href="https://twitter.com/intent/tweet?text=The%20ultimate%20cheatsheet%20for%20CircleCI.%20https://devhints.io/circle.html" target="share"><span class="text"></span></a></li>
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="about-the-site">
|
||
<div class="container">
|
||
<p class='blurb'>
|
||
<strong><a href=".">Devhints.io cheatsheets</a></strong> is a collection of cheatsheets I've written over the years.
|
||
Suggestions and corrections? <a href='https://github.com/rstacruz/cheatsheets/issues/907'>Send them in</a>.
|
||
<i class='fleuron'></i>
|
||
I'm <a href="http://ricostacruz.com">Rico Sta. Cruz</a>.
|
||
Check out my <a href="http://ricostacruz.com/til">Today I learned blog</a> for more.
|
||
</p>
|
||
|
||
|
||
<p class='back'>
|
||
<a class='big-button -back -slim' href='.#toc'></a>
|
||
</p>
|
||
|
||
|
||
<p>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/highlight.min.js"></script>
|
||
|
||
|
||
|
||
|
||
<script src="https://cdn.rawgit.com/rstacruz/unorphan/v1.0.1/index.js"></script>
|
||
<script>hljs.initHighlightingOnLoad()</script>
|
||
<script>unorphan('h1, h2, h3, p, li, .unorphan')</script>
|
||
|
||
</body>
|
||
</html>
|
||
|