User Teardown Steps in Templates and Manual Start for [skip ci] and restrictPR
<p>Dao Lam, Software Engineer, Verizon Media</p>
<p>Dekus Lam, Software Engineer, Verizon Media</p>
<p><a href="https://screwdriver.cd">Screwdriver V4</a> <a href="https://blog.screwdriver.cd/post/175821149087/user-teardown-steps">user teardown steps</a> are now working for templates. In the below example, <code>teardown-write</code> will be injected to the end of the build (before Screwdriver teardown steps) and will run regardless of build status. If the template has the same teardown step, it will be overwritten by user’s teardown step.</p>
<p><!-- more --></p>
<pre><code> jobs:
main:
image: node:8
template: template_namespace/nodejs_main@1.2.0
steps:
- teardown-write: echo hello
requires: [~pr, ~commit]
</code></pre>
<p>Additionally, we also added the ability to manually start <a href="https://docs.screwdriver.cd/user-guide/FAQ.html#how-do-i-skip-a-build">skip ci</a> or <a href="https://docs.screwdriver.cd/user-guide/configuration/annotations#pipeline-level-annotations">restrictPR</a> events.</p>
<p>For <code>skip ci</code>, users can now hover over the empty build and select “Start pipeline from here” to trigger the build manually.</p>
<p><img src="https://66.media.tumblr.com/1110fbee0012fcb5d2d03d64dc8580fa/tumblr_inline_poshajZIxR1qf05nt_540.png" alt="image"/></p>
<p>For <code>restrictPR</code>, users can now click on the <code>Start</code> button to manually start the build.</p>
<p><img src="https://66.media.tumblr.com/3bb77109a8eb637aeb22da945ea0a27c/tumblr_inline_poshblMhSC1qf05nt_540.png" alt="image"/></p>
<p><em>Note:</em> if <code>skip ci</code> commit is made by a bot under the <code>ignoreCommitsBy</code> <a href="https://docs.screwdriver.cd/cluster-management/configure-api.html#configuration">configured by the cluster</a>, <code>skip ci</code> will take precedence and users can still manually start the build.</p>
<h2>Compatibility List</h2>
<p>In order to use this feature, you will need these minimum versions:</p>
<ul><li><a href="https://hub.docker.com/r/screwdrivercd/screwdriver">API</a> - v0.5.624</li>
<li>[UI](<a href="https://hub.docker.com/r/screwdrivercd/ui">https://hub.docker.com/r/screwdrivercd/ui</a> - v1.0.389</li>
</ul><h2>Contributors</h2>
<p>Thanks to the following contributors for making this feature possible:</p>
<ul><li><a href="https://github.com/d2lam">d2lam</a></li>
<li><a href="https://github.com/dekuslam">dekus</a></li>
</ul><p>Questions & Suggestions
We’d love to hear from you. If you have any questions, please feel free to reach out <a href="https://docs.screwdriver.cd/about/support">here</a>. You can also visit us on <a href="https://github.com/screwdriver-cd">Github</a> and <a href="https://slack.screwdriver.cd">Slack</a>.</p>