Skip to content

Commit

Permalink
Merge pull request #121 from screwdriver-cd/new_workflow
Browse files Browse the repository at this point in the history
fix(770): Update configuration doc with new workflow
  • Loading branch information
d2lam authored Nov 6, 2017
2 parents fab08dd + 1b58aff commit 21a4c1c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
34 changes: 21 additions & 13 deletions docs/user-guide/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ You can access information about properties by hovering over the property name.
<div class="yaml-docs">

<pre class="example">
<a href="#workflow"><span class="key">workflow</span>:
- <span class="value">publish</span>
- <span class="value">deploy-west</span>
</a>
<a href="#shared"><span class="key">shared</span>:</a>
<a href="#environment"><span class="key">environment</span>:
<span class="key">NODE_ENV</span>: <span class="value">test</span></a>
Expand All @@ -32,28 +28,44 @@ You can access information about properties by hovering over the property name.
<a href="#annotations"><span class="key">annotations</span>:
<span class="key">beta.screwdriver.cd/my-annotation</span>: <span class="value">my-data</span></a>
<a href="#jobs"><span class="key">jobs</span>:</a>
<a href="#main-job"><span class="key">main</span>:</a>
<span class="key">main</span>:
<a href="#requires"><span class="key">requires</span>: <span class="value">[~pr, ~commit, ~sd@123:main]</span></a>
<a href="#image"><span class="key">image</span>: <span class="value">node:6</span></a>
<a href="#steps"><span class="key">steps</span>:
- <span class="key">init</span>: <span class="value">npm install</span>
- <span class="key">test</span>: <span class="value">npm test</span></a>
<a href="#jobs"><span class="key">publish</span>:
<span class="key">requires</span>: <span class="value">main</span>
<span class="key">image</span>: <span class="value">node:6</span>
<span class="key">steps</span>:
- <span class="key">publish</span>: <span class="value">npm publish</span></a>
<a href="#jobs"><span class="key">deploy-west</span>:
<span class="key">requires</span>: <span class="value">publish</span>
<span class="key">image</span>: <span class="value">node:6</span>
<span class="key">environment</span>:
<span class="key">DEPLOY_ENV</span>: <span class="value">west</span>
<span class="key">steps</span>:
- <span class="key">init</span>: <span class="value">npm install</span>
- <span class="key">publish</span>: <span class="value">npm deploy</span></a>
- <span class="key">deploy</span>: <span class="value">npm deploy</span></a>
<a href="#jobs"><span class="key">deploy-east</span>:
<span class="key">requires</span>: <span class="value">publish</span>
<span class="key">image</span>: <span class="value">node:6</span>
<span class="key">environment</span>:
<span class="key">DEPLOY_ENV</span>: <span class="value">east</span>
<span class="key">steps</span>:
- <span class="key">init</span>: <span class="value">npm install</span>
- <span class="key">deploy</span>: <span class="value">npm deploy</span></a>
<a href="#jobs"><span class="key">finished</span>:
<span class="key">requires</span>: <span class="value">[deploy-west, deploy-east]</span>
<span class="key">image</span>: <span class="value">node:6</span>
<span class="key">steps</span>:
- <span class="key">echo</span>: <span class="value">echo done</span></a>
<a href="#jobs">...</a>
</pre>
<div class="yaml-side">
<div id="workflow" class="hidden">
<h4>Workflow</h4>
<p>Defines the order of jobs that are executed for the project. All jobs referenced by the workflow must be defined in the jobs section.</p>
<div id="requires" class="hidden">
<h4>Requires</h4>
<p>A single job name or array of jobs that will trigger the job to run. Jobs defined with "requires: ~pr" are started by pull-request events. Jobs defined with "requires: ~commit" are started by push events. Jobs defined with "requires: ~sd@123:main" are started by job "main" from pipeline "123". Jobs defined with "requires: [deploy-west, deploy-east] are started after "deploy-west" and "deploy-east" are both done running successfully. "Note: ~ jobs denote an OR functionality, jobs without a ~ denote join functionality.</p>
</div>
<div id="shared" class="hidden">
<h4>Shared</h4>
Expand All @@ -79,10 +91,6 @@ You can access information about properties by hovering over the property name.
<h4>Jobs</h4>
<p>A series of jobs that define the behavior of your builds.</p>
</div>
<div id="main-job" class="hidden">
<h4>Main</h4>
<p>The only required job. This job is executed automatically whenever there is a code change.</p>
</div>
<div id="image" class="hidden">
<h4>Image</h4>
<p>This defines the Docker image used for the builds. This value should be the same as you would use for a "docker pull" command.</p>
Expand Down
6 changes: 4 additions & 2 deletions docs/user-guide/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: main
title: Environment Variables
category: User Guide
menu: menu
toc:
toc:
- title: Environment Variables
url: "#environment-variables"
active: true
Expand All @@ -22,7 +22,7 @@ toc:
---
# Environment Variables

Screwdriver exports a set of environment variables that you can rely on during the course of a build.
Screwdriver exports a set of environment variables that you can rely on during build runtime.

_Note: Environment variables set in one job cannot be accessed in another job. To pass variables between jobs, use [metadata](./configuration/metadata)._

Expand Down Expand Up @@ -54,6 +54,8 @@ _Note: Environment variables set in one job cannot be accessed in another job. T
| Name | Value |
|------|-------|
| SCM_URL | SCM URL that was checked out |
| GIT_URL | SCM URL that was checked out with .git appended |
| GIT_BRANCH | Reference for PR or the branch (e.g.: `origin/refs/${PRREF}` or `origin/${BRANCH}`) |

## URLs

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ To update a Screwdriver template, make changes in your SCM repository and rerun

## Finding templates

To figure out which templates already exist, you can make a `GET` call to the `/templates` endpoint. See the [API documentation](./api) for more information.
To figure out which templates already exist, you can make a `GET` call to the `/templates` endpoint. See the [API documentation](./api) for more information. There should also be a `/templates` endpoint in the UI.

0 comments on commit 21a4c1c

Please sign in to comment.