Skip to content
Open
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ We host the [PipeCD Development and Community Meetings](https://zoom-lfx.platfor

### Join our team on GitHub

We welcome and appreciate your contributions to the PipeCD project. If you would like to continue contributing to the project as a member of the pipe-cd GitHub organization, please attend the [public community meeting](#join-our-public-community-meeting) and let us know or ping us on the #pipecd channel in the CNCF Slack. Here are some minimum requirements to have before you can ask for the membership:
We welcome and appreciate your contributions to the PipeCD project. If you would like to continue contributing to the project as a member of the pipe-cd GitHub organization, please attend the [public community meeting](https://zoom-lfx.platform.linuxfoundation.org/meeting/96831504919?password=2f60b8ec-5896-40c8-aa1d-d551ab339d00) and let us know or ping us on the #pipecd channel in the CNCF Slack. Here are some minimum requirements to have before you can ask for the membership:

- Have at least 5 PRs successfully merged to repositories in the pipe-cd GitHub organization
- Have attended PipeCD public community meeting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Installing on a Kubernetes cluster"
linkTitle: "Installing on a Kubernetes cluster"
weight: 1
description: >
This page describes how install Piped on a Kubernetes cluster.
This page describes how to install Piped on a Kubernetes cluster.
---

## Prerequisites
Expand All @@ -16,7 +16,7 @@ description: >
### SSH Key for Git Repositories

- If your Git repositories are private, `piped` requires a private SSH key to access those repositories.
- Please checkout [this documentation](https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) for how to generate a new SSH key pair. Then add the public key to your repositories. (If you are using GitHub, you can add it to Deploy Keys at the repository's Settings page.)
- Please check out [this documentation](https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) for how to generate a new SSH key pair. Then add the public key to your repositories. (If you are using GitHub, you can add it to Deploy Keys at the repository's Settings page.)

If your Git repositories are private, `piped` needs an SSH key to access them.

Expand All @@ -27,11 +27,11 @@ If your Git repositories are private, `piped` needs an SSH key to access them.

## Installation

### Preparing the `Piped` configuaration file
### Preparing the `Piped` configuration file

Plugins are external binaries that have to be referenced in the piped configuration file. There are no plugins set by default.

An example of the a piped V1 configuration file using the Kubernetes plugin:
An example of a piped V1 configuration file using the Kubernetes plugin:

```yaml
apiVersion: pipecd.dev/v1beta1
Expand All @@ -52,7 +52,7 @@ spec:
>**Note:**
>`Piped`'s plugins are versioned independently from PipeCD. See the [latest releases](https://github.com/pipe-cd/pipecd/releases) for more information.
>
>We now also have a repository for community built plugins. See the [Community plugins repository on GitHub](https://github.com/pipe-cd/community-plugins) to know more.
>We now also have a repository for community-built plugins. See the [Community plugins repository on GitHub](https://github.com/pipe-cd/community-plugins) to know more.

## In the cluster-wide mode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description: >
### SSH Key for Git Repositories

- If your Git repositories are private, `piped` requires a private SSH key to access those repositories.
- Please checkout [this documentation](https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) for how to generate a new SSH key pair. Then add the public key to your repositories. (If you are using GitHub, you can add it to Deploy Keys at the repository's Settings page.)
- Please check out [this documentation](https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) for how to generate a new SSH key pair. Then add the public key to your repositories. (If you are using GitHub, you can add it to Deploy Keys at the repository's Settings page.)

If your Git repositories are private, `piped` needs an SSH key to access them.

Expand All @@ -32,11 +32,11 @@ Download the latest `piped` V1. See the [latest releases](https://github.com/pip

## Installation

### Preparing the `Piped` configuaration file
### Preparing the `Piped` configuration file

Plugins are external binaries that have to be referenced in the piped configuration file. There are no plugins set by default.

An example of the a piped V1 configuration file using the [Example-stage plugin](https://github.com/pipe-cd/community-plugins/tree/main/plugins/example-stage):
An example of a piped V1 configuration file using the [Example-stage plugin](https://github.com/pipe-cd/community-plugins/tree/main/plugins/example-stage):

```yaml
apiVersion: pipecd.dev/v1beta1
Expand All @@ -59,7 +59,7 @@ See [ConfigurationReference](../../../user-guide/managing-piped/configuration-re
>**Note:**
>`Piped`'s plugins are versioned independently from PipeCD. Official plugins are maintained and monitored by the PipeCD Maintainers. See the [latest releases](https://github.com/pipe-cd/pipecd/releases) for more information.
>
>We now also have a repository for community built plugins. See the [Community plugins repository on GitHub](https://github.com/pipe-cd/community-plugins) to know more.
>We now also have a repository for community-built plugins. See the [Community plugins repository on GitHub](https://github.com/pipe-cd/community-plugins) to know more.

## Run the `piped`

Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/docs-v1.0.x/overview/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >
Overview about PipeCD.
---

![PipeCD explaination](/images/pipecd-explanation.png)
![PipeCD explanation](/images/pipecd-explanation.png)
<p style="text-align: center;">
PipeCD - a GitOps style continuous delivery solution
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Therefore, you mainly need to:
#### Use the `.pipe/` directory

Prepare EventWatcher configuration files under the `.pipe/` directory at the root of your Git repository.
In that files, you define which values in which files should be updated when the Piped found out a new Event.
In those files, you define which values in which files should be updated when the Piped found out a new Event.

For instance, suppose you want to update the Kubernetes manifest defined in `helloworld/deployment.yaml` when an Event with the name `helloworld-image-update` occurs:

Expand Down
15 changes: 15 additions & 0 deletions pkg/app/piped/eventwatcher/eventwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ func (w *watcher) execute(ctx context.Context, repo git.Repo, repoID string, eve
gitUpdateEvent = false
branchHandledEvents = make(map[string][]*pipedservice.ReportEventStatusesRequest_Event, len(eventCfgs))
gitNoChangeEvents = make([]*pipedservice.ReportEventStatusesRequest_Event, 0)
failureEvents = make([]*pipedservice.ReportEventStatusesRequest_Event, 0)
)
for _, e := range eventCfgs {
for _, cfg := range e.Configs {
Expand Down Expand Up @@ -435,6 +436,12 @@ func (w *watcher) execute(ctx context.Context, repo git.Repo, repoID string, eve
zap.String("event-name", latestEvent.Name),
zap.String("event-id", latestEvent.Id),
)
handledEvent := &pipedservice.ReportEventStatusesRequest_Event{
Id: latestEvent.Id,
Status: model.EventStatus_EVENT_FAILURE,
StatusDescription: fmt.Sprintf("Event watcher handler type %s is not supported", handler.Type),
}
failureEvents = append(failureEvents, handledEvent)
continue
}
}
Expand All @@ -447,6 +454,14 @@ func (w *watcher) execute(ctx context.Context, repo git.Repo, repoID string, eve
w.logger.Info(fmt.Sprintf("successfully made %d events OUTDATED", len(outDatedEvents)))
}

if len(failureEvents) > 0 {
if _, err := w.apiClient.ReportEventStatuses(ctx, &pipedservice.ReportEventStatusesRequest{Events: failureEvents}); err != nil {
w.logger.Error("failed to report event failure statuses", zap.Error(err))
return err
}
w.logger.Info(fmt.Sprintf("successfully reported %d event failures", len(failureEvents)))
}

if !gitUpdateEvent {
return nil
}
Expand Down
Loading