Skip to content

Commit

Permalink
Update README to latest format (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
karanpopat authored Dec 13, 2023
1 parent 51717a7 commit 5d54e19
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 @@ Opsgenie pipeline library for [Flowpipe](https://flowpipe.io), enabling seamless

## 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-opsgenie.git
cd flowpipe-mod-opsgenie
```

### Credentials

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

### Usage

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

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

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

```sh
flowpipe pipeline run create_incident --arg message='Incident from Flowpipe'
flowpipe mod install github.com/turbot/flowpipe-mod-opsgenie
```

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

```sh
flowpipe pipeline run create_alert --arg message='Alert from Flowpipe'
vi my_pipeline.fp
```

To use a specific `credential`, specify the `cred` pipeline argument:
```hcl
pipeline "my_pipeline" {
step "pipeline" "create_alert" {
pipeline = opsgenie.pipeline.create_alert
args = {
message = "Alert from Flowpipe"
}
}
}
```

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

```sh
flowpipe pipeline run my_pipeline
```

### Developing

Clone:

```sh
flowpipe pipeline run create_alert --arg message='Alert from Flowpipe' --arg cred=opsgenie_prod
git clone https://github.com/turbot/flowpipe-mod-opsgenie.git
cd flowpipe-mod-opsgenie
```

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

### Configuration
```sh
flowpipe pipeline list
```

No additional configuration is required.
Run a pipeline:

```sh
flowpipe pipeline run create_alert --arg message="Alert from Flowpipe"
```

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

```sh
flowpipe pipeline run create_alert --arg message="Alert from Flowpipe" --arg cred=opsgenie_profile
```

## Open Source & Contributing

Expand Down

0 comments on commit 5d54e19

Please sign in to comment.