From ec3153476fe87264e6763ebd9844ab3fe7979e41 Mon Sep 17 00:00:00 2001 From: Karan Popat Date: Wed, 13 Dec 2023 18:34:24 +0530 Subject: [PATCH] Update README to latest format (#2) --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ed38568..d040569 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,6 @@ brew tap turbot/tap brew install flowpipe ``` -Clone: - -```sh -git clone https://github.com/turbot/flowpipe-mod-uptimerobot.git -cd flowpipe-mod-uptimerobot -``` - ### Credentials By default, the following environment variables will be used for authentication: @@ -46,19 +39,62 @@ 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 UptimeRobot mod](https://www.flowpipe.io/docs/mods/mod-dependencies#mod-dependencies) as a dependency: ```sh -flowpipe pipeline run get_account +flowpipe mod install github.com/turbot/flowpipe-mod-uptimerobot ``` -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 +vi my_pipeline.fp +``` + +```hcl +pipeline "my_pipeline" { + + step "pipeline" "create_monitor" { + pipeline = uptimerobot.pipeline.create_monitor + args = { + friendly_name = "My New Monitor" + url = "https://example.com" + type = "1" + } + } +} +``` + +[Run the pipeline](https://www.flowpipe.io/docs/run/pipelines): + +```sh +flowpipe pipeline run my_pipeline +``` + +### Developing + +Clone: + +```sh +git clone https://github.com/turbot/flowpipe-mod-uptimerobot.git +cd flowpipe-mod-uptimerobot +``` + +List pipelines: + +```sh +flowpipe pipeline list +``` + +Run a pipeline: ```sh flowpipe pipeline run create_monitor --arg friendly_name="My New Monitor" --arg url="https://example.com" --arg type="1" @@ -67,7 +103,7 @@ flowpipe pipeline run create_monitor --arg friendly_name="My New Monitor" --arg To use a specific `credential`, specify the `cred` pipeline argument: ```sh -flowpipe pipeline run create_monitor --arg cred=my_uptimerobot --arg friendly_name="My New Monitor" --arg url="https://example.com" --arg type="1" +flowpipe pipeline run create_monitor --arg cred=uptimerobot_profile --arg friendly_name="My New Monitor" --arg url="https://example.com" --arg type="1" ``` ## Open Source & Contributing