Skip to content

Commit

Permalink
Update README to latest format (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyanka-Chatterjee-2000 authored Dec 13, 2023
1 parent 790c9d9 commit dba0ea0
Showing 1 changed file with 46 additions and 22 deletions.
68 changes: 46 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ PagerDuty pipeline library for [Flowpipe](https://flowpipe.io), enabling seamles

## Getting started

### Requirements

Docker daemon must be installed and running. Please see [Install Docker Engine](https://docs.docker.com/engine/install/) for more information.

### Installation

Download and install Flowpipe (https://flowpipe.io/downloads). Or use Brew:
Expand All @@ -21,13 +17,6 @@ brew tap turbot/tap
brew install flowpipe
```

Clone:

```sh
git clone https://github.com/turbot/flowpipe-mod-pagerduty.git
cd flowpipe-mod-pagerduty
```

### Credentials

By default, the following environment variables will be used for authentication:
Expand All @@ -50,35 +39,70 @@ For more information on credentials in Flowpipe, please see [Managing Credential

### Usage

List pipelines:
[Initialize a mod](https://flowpipe.io/docs/build/index#initializing-a-mod):

```sh
flowpipe pipeline list
mkdir my_mod
cd my_mod
flowpipe mod init
```

Run a pipeline:
[Install the PagerDuty mod](https://flowpipe.io/docs/build/mod-dependencies#mod-dependencies) as a dependency:

```sh
flowpipe pipeline run list_incidents
flowpipe mod install github.com/turbot/flowpipe-mod-pagerduty
```

You can pass in pipeline arguments as well:
[Use the dependency](https://flowpipe.io/docs/build/write-pipelines/index) in a pipeline step:

```sh
flowpipe pipeline run list_incidents --arg api_key=u+gLkyUh9sGsEGH3nmtw
vi my_pipeline.fp
```

To use a specific `credential`, specify the `cred` pipeline argument:
```hcl
pipeline "my_pipeline" {
step "pipeline" "list_incidents" {
pipeline = pagerduty.pipeline.list_incidents
args = {
api_key = "u+gLkyUh9sGsEGH3nmtw"
}
}
}
```

[Run the pipeline](https://flowpipe.io/docs/run/pipelines):

```sh
flowpipe pipeline run my_pipeline
```

### Developing

Clone:

```sh
git clone https://github.com/turbot/flowpipe-mod-pagerduty.git
cd flowpipe-mod-pagerduty
```

List pipelines:

```sh
flowpipe pipeline run list_incidents --arg api_key=u+gLkyUh9sGsEGH3nmtw --arg cred=pagerduty_cred
flowpipe pipeline list
```

For more examples on how you can run pipelines, please see [Run Pipelines](https://flowpipe.io/docs/run/pipelines).
Run a pipeline:

```sh
flowpipe pipeline run list_incidents --arg api_key=u+gLkyUh9sGsEGH3nmtw
```

### Configuration
To use a specific `credential`, specify the `cred` pipeline argument:

No additional configuration is required.
```sh
flowpipe pipeline run list_incidents --arg api_key=u+gLkyUh9sGsEGH3nmtw --arg cred=pagerduty_profile
```

## Open Source & Contributing

Expand Down

0 comments on commit dba0ea0

Please sign in to comment.