<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Percy &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/tag/percy/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Mon, 12 Oct 2026 10:47:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Integrating Codeship Pro and Docker with Percy Visual Testing</title>
		<link>https://www.bestdevops.com/integrating-codeship-pro-and-docker-with-percy-visual-testing/</link>
					<comments>https://www.bestdevops.com/integrating-codeship-pro-and-docker-with-percy-visual-testing/#respond</comments>
		
		<dc:creator><![CDATA[anil]]></dc:creator>
		<pubDate>Fri, 02 Jun 2017 07:21:01 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[DevOps Tools]]></category>
		<category><![CDATA[BestDevOps]]></category>
		<category><![CDATA[Codeship Pro]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Integrating]]></category>
		<category><![CDATA[Percy]]></category>
		<category><![CDATA[Percy Visual Testing]]></category>
		<category><![CDATA[Pro]]></category>
		<guid isPermaLink="false">http://www.bestdevops.com/?p=1711</guid>

					<description><![CDATA[Learn how to connect Percy visual testing to your Codeship Pro CI/CD pipeline using Docker, covering static sites, Ruby (Capybara), and Ember project setups.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><em>Source: documentation.codeship.com</em></p>



<h2 class="wp-block-heading">What Is Percy?</h2>



<p class="wp-block-paragraph">Percy is a visual testing tool that integrates into your CI/CD pipeline to capture screenshots of your application, track visual changes between builds, and require explicit team approval before visual regressions are accepted. When combined with Codeship Pro and Docker, Percy lets you automate visual regression detection as a first-class step in your delivery workflow.</p>



<h2 class="wp-block-heading">Setting Up Percy with Codeship Pro</h2>



<p class="wp-block-paragraph">The integration relies on two components working together: Percy&#8217;s SDK (which varies by project type) installed inside your Docker image, and Percy&#8217;s API credentials passed in as encrypted environment variables in Codeship Pro.</p>



<h3 class="wp-block-heading">Setting Your Percy Environment Variables</h3>



<p class="wp-block-paragraph">When you create a new project inside Percy, the platform provides two credential values:</p>



<ul class="wp-block-list">
  <li><code>PERCY_TOKEN</code> — the API token that authenticates your builds with Percy.</li>
  <li><code>PERCY_PROJECT</code> — the unique identifier for your Percy project.</li>
</ul>



<p class="wp-block-paragraph">Both values must be added as encrypted environment variables in your <code>codeship-services.yml</code> file. Codeship Pro&#8217;s encrypted environment variable support ensures these secrets are never stored in plain text in your repository. Refer to the <a href="https://documentation.codeship.com/pro/builds-and-configuration/environment-variables/">Codeship Pro environment variables documentation</a> for instructions on encrypting and referencing these values.</p>



<h2 class="wp-block-heading">Integration by Project Type</h2>



<h3 class="wp-block-heading">Static Sites</h3>



<p class="wp-block-paragraph">For static HTML sites running inside Docker images on Codeship Pro, Percy provides a CLI tool distributed as a Ruby gem. Install it in your Dockerfile:</p>


<pre class="wp-block-code"><span><code class="hljs">RUN gem install percy-cli</code></span></pre>


<p class="wp-block-paragraph"><strong>Prerequisite:</strong> Your Docker image must include both Ruby and RubyGems. Without them, the gem installation step will fail.</p>



<p class="wp-block-paragraph">Once the gem is installed, add a Percy snapshot step to your <code>codeship-steps.yml</code> file:</p>


<pre class="wp-block-code"><span><code class="hljs">- service: your_service
  command: percy snapshot directory_to_snapshot</code></span></pre>


<p class="wp-block-paragraph">A few important details about this command:</p>



<ul class="wp-block-list">
  <li>Replace <code>your_service</code> with the name of the service defined in your <code>codeship-services.yml</code>.</li>
  <li>Replace <code>directory_to_snapshot</code> with the path to the directory containing your built static files.</li>
  <li>The target directory <strong>must contain HTML files</strong> — Percy uses them to render the snapshots.</li>
  <li>You can add multiple snapshot steps to cover multiple directories in one build.</li>
</ul>



<h3 class="wp-block-heading">Ruby Projects</h3>



<p class="wp-block-paragraph">For Ruby applications using Capybara, Minitest, RSpec, or similar test frameworks, Percy provides the <code>percy-capybara</code> gem. Add it to your Dockerfile:</p>


<pre class="wp-block-code"><span><code class="hljs">RUN gem install percy-capybara</code></span></pre>


<p class="wp-block-paragraph">Alternatively, add <code>percy-capybara</code> to your <code>Gemfile</code> and let Bundler manage the dependency — this is typically the cleaner approach for Ruby projects.</p>



<p class="wp-block-paragraph"><strong>Prerequisite:</strong> As with static sites, your Docker image must include both Ruby and RubyGems.</p>



<p class="wp-block-paragraph">After installation, you need to add Percy hooks directly into your test specs. The specific integration code — such as calling <code>Percy::Capybara.snapshot</code> within your tests — is documented in detail in the Percy documentation for each supported test framework. Your test suite is then invoked via the standard command step in <code>codeship-steps.yml</code>, and Percy captures snapshots automatically as tests run.</p>



<h3 class="wp-block-heading">Ember Projects</h3>



<p class="wp-block-paragraph">For Ember.js applications, Percy provides a dedicated Ember addon. Install it inside your Docker image by adding the following to your Dockerfile:</p>


<pre class="wp-block-code"><span><code class="hljs">RUN ember install ember-percy</code></span></pre>


<p class="wp-block-paragraph">As with the Ruby integration, you will need to add Percy hooks to your Ember test specs. Consult the Percy documentation for the specific API calls required to trigger snapshots within your Ember tests. Your test suite is then invoked via your <code>codeship-steps.yml</code> file as a normal build step, and Percy captures visual snapshots during the test run.</p>



<h2 class="wp-block-heading">How the Full Pipeline Fits Together</h2>



<p class="wp-block-paragraph">Regardless of project type, the overall integration pattern in Codeship Pro is consistent:</p>



<ol class="wp-block-list">
  <li><strong>Build your Docker image</strong> with the appropriate Percy SDK installed.</li>
  <li><strong>Encrypt your Percy credentials</strong> (<code>PERCY_TOKEN</code> and <code>PERCY_PROJECT</code>) and reference them in <code>codeship-services.yml</code>.</li>
  <li><strong>Run your tests or snapshot command</strong> as a step in <code>codeship-steps.yml</code>.</li>
  <li><strong>Review visual diffs</strong> in the Percy dashboard, where your team can approve or reject detected changes before the build is considered passing.</li>
</ol>



<p class="wp-block-paragraph">This workflow ensures that visual regressions are caught automatically in CI, and that no unreviewed UI change can silently reach production.</p>



<h2 class="wp-block-heading">Further Reading</h2>



<ul class="wp-block-list">
  <li><a href="https://percy.io/docs">Percy documentation</a> — SDK setup guides for all supported frameworks.</li>
  <li><a href="https://documentation.codeship.com/pro/">Codeship Pro documentation</a> — reference for <code>codeship-services.yml</code> and <code>codeship-steps.yml</code>.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.bestdevops.com/integrating-codeship-pro-and-docker-with-percy-visual-testing/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
