From f37ce2346325ee3d108982bae060cb0c88436172 Mon Sep 17 00:00:00 2001 From: Khushboo <46913995+khushboo9024@users.noreply.github.com> Date: Wed, 13 Dec 2023 18:30:13 +0530 Subject: [PATCH] Update README.md as per latest standard (#2) --- README.md | 67 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index c70bda7..93e3070 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,6 @@ Ipstack pipeline library for [Flowpipe](https://flowpipe.io) enabling seamless i ## 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: @@ -21,12 +17,6 @@ brew tap turbot/tap brew install flowpipe ``` -Clone: - -```sh -git clone https://github.com/turbot/flowpipe-mod-ipstack.git -cd flowpipe-mod-ipstack -``` ### Credentials By default, the following environment variables will be used for authentication: @@ -49,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 Ipstack mod](https://flowpipe.io/docs/build/mod-dependencies#mod-dependencies) as a dependency: ```sh -flowpipe pipeline run lookup_ip_address --arg ip_address='76.76.21.21' +flowpipe mod install github.com/turbot/flowpipe-mod-ipstack ``` -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 lookup_ip_address --arg ip_address='76.76.21.21' --arg output_type='xml' +vi my_pipeline.fp ``` -To use a specific `credential`, specify the `cred` pipeline argument: +```hcl +pipeline "my_pipeline" { + + step "pipeline" "lookup_ip_address" { + pipeline = ipstack.pipeline.lookup_ip_address + args = { + ip_address = "76.76.21.21" + } + } +} +``` + +[Run the pipeline](https://flowpipe.io/docs/run/pipelines): ```sh -flowpipe pipeline run lookup_ip_address --arg ip_address='76.76.21.21' --arg cred=ipstack_api_key +flowpipe pipeline run my_pipeline ``` -For more examples on how you can run pipelines, please see [Run Pipelines](https://flowpipe.io/docs/run/pipelines). +### Developing -### Configuration +Clone: -No additional configuration is required. +```sh +git clone https://github.com/turbot/flowpipe-mod-ipstack.git +cd flowpipe-mod-ipstack +``` + +List pipelines: + +```sh +flowpipe pipeline list +``` + +Run a pipeline: + +```sh +flowpipe pipeline run lookup_ip_address --arg ip_address='76.76.21.21' +``` + +To use a specific `credential`, specify the `cred` pipeline argument: + +```sh +flowpipe pipeline run lookup_ip_address --arg ip_address='76.76.21.21' --arg cred=ipstack_api_key +``` ## Open Source & Contributing