Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "Customizing application's deployment pipeline"
linkTitle: "Customizing deployment"
weight: 3
description: >
This page describes how to customize an application's deployment pipeline with PipeCD defined stages.
---

The previous section demonstrated how to use application kind-specific stages in PipeCD to build up a pipeline that defines how Piped should deploy your application. In this section, aside from the application kind-specific stages, we will see some commonly defined pipeline stages, which can be used to build up a more flexible deployment pipeline for your application.

![Deployment wait stage screenshot](/images/deployment-wait-stage.png)
<p style="text-align: center;">
Example deployment with a WAIT stage
</p>

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "Adding a manual approval stage"
linkTitle: "Manual approval stage"
weight: 2
description: >
This page describes how to add a manual approval stage.
---

While deploying an application to production environments, some teams require manual approvals before continuing.
The manual approval stage enables you to control when the deployment is allowed to continue by requiring a specific person or team to approve.
This stage is called `WAIT_APPROVAL` and you can add it to your pipeline before stages that require approval before they can be executed.

```yaml
apiVersion: pipecd.dev/v1beta1
kind: Application
spec:
pipeline:
stages:
- name: K8S_CANARY_ROLLOUT
- name: WAIT_APPROVAL
with:
approvers:
- user-abc
timeout: 6h
- name: K8S_PRIMARY_ROLLOUT
plugins: {}
```

In the above example, the deployment requires an approval from `user-abc` before `K8S_PRIMARY_ROLLOUT` stage can be executed.

The value of user ID in the `approvers` list depends on your [SSO configuration](../../../managing-controlplane/auth/). It must be GitHub's user ID if your SSO was configured to use GitHub provider. It must be Gmail account if your SSO was configured to use Google provider.

In case the `approvers` field was not configured, anyone in the project who has `Editor` or `Admin` role can approve the deployment pipeline.

Also, it will end in failure when the time specified in `timeout` has elapsed. Default is `6h`.

![Screenshot of Wait Approval Stage](/images/deployment-wait-approval-stage.png)
<p style="text-align: center;">
Deployment with a WAIT_APPROVAL stage
</p>

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "Adding a wait stage"
linkTitle: "Wait stage"
weight: 1
description: >
This page describes how to add a WAIT stage.
---

In addition to waiting for approvals from someone, the deployment pipeline can be configured to wait for a specified amount of time before continuing.
This can be done by adding the `WAIT` stage into the pipeline. This stage has one configurable field `duration` to configure how long to wait.

```yaml
apiVersion: pipecd.dev/v1beta1
kind: Application
spec:
pipeline:
stages:
- name: K8S_CANARY_ROLLOUT
- name: WAIT
with:
duration: 5m
- name: K8S_PRIMARY_ROLLOUT
- name: K8S_CANARY_CLEAN
plugins: {}
```

![Screenshot of Deployment Wait Stage](/images/deployment-wait-stage.png)
<p style="text-align: center;">
Deployment with a WAIT stage
</p>

Loading