diff --git a/.github/workflows/trigger-flowpipe-io.yml b/.github/workflows/trigger-flowpipe-io.yml index 758ee3d..ae42025 100644 --- a/.github/workflows/trigger-flowpipe-io.yml +++ b/.github/workflows/trigger-flowpipe-io.yml @@ -7,6 +7,9 @@ on: branches-ignore: - "main" + pull_request: + types: [opened] + jobs: update: runs-on: ubuntu-latest @@ -16,6 +19,50 @@ jobs: uses: peter-evans/repository-dispatch@v2 with: token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }} - repository: turbotio/flowpipe.io - event-type: build-preview - client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "ref_name": "${{ github.ref_name }}"}' \ No newline at end of file + repository: turbot/flowpipe.io + event-type: build-preview-test + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "ref_name": "${{ github.ref_name }}"}' + + + comment-link: + runs-on: ubuntu-latest + timeout-minutes: 5 + if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} + steps: + - name: Get the deployment details + id: get_deployment_details + if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} + uses: actions/github-script@v6 + with: + script: | + const branchName = 'docs/${{ github.event.pull_request.head.ref }}'; + + const response = await fetch('https://flowpipe-io.vercel.app/api/service/deploy-details', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Authorization': 'Bearer ${{ secrets.FLOWPIPE_API_KEY }}', + }, + body: JSON.stringify({ branch: branchName }), + }); + if (!response.ok) { + core.setOutput('foundDeployment', false); + } else { + const data = await response.json(); + core.setOutput('foundDeployment', true); + core.setOutput('apiResponse', data); + } + + - name: Add comment with preview link + uses: actions/github-script@v7 + if: ${{ steps.get_deployment_details.outputs.foundDeployment == 'true' }} + with: + script: | + const apiResponse = ${{ steps.get_deployment_details.outputs.apiResponse }}; + + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `### Preview Available 🚀\n\n**Commit Author:** ${apiResponse.meta.githubCommitAuthorName}\n**Commit Message:** ${apiResponse.meta.githubCommitMessage}\n\n**Preview Link:** [${apiResponse.meta.branchAlias}](https://${apiResponse.meta.branchAlias})` + }); \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2782ec6..538c762 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,8 @@ yarn-error.log* /tmp content/docs -.vscode \ No newline at end of file +.vscode +images/**/*.todo +images/**/*.keep +images/**/*.sav +images/**/*.json diff --git a/README.md b/README.md index bd99eeb..df7ca4a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ We support up to 2 levels of docs, e.g.: For your docs to appear in the sidebar, you need to edit `docs/sidebar.json`. This is an array of sidebar entries, which are either stings matching the path of the required document, or a category to nest the docs down 1 level. -Any images required by docs must be placed in `/images/docs/...` and must be referenced by the tag ``. +Any images required by docs must be placed in `/images/docs/...` and must be referenced by the tag ``. # Guidelines for contribution diff --git a/docs/build/input.md b/docs/build/input.md index d8182db..c9d24ec 100644 --- a/docs/build/input.md +++ b/docs/build/input.md @@ -58,12 +58,12 @@ After the user selects a game, the pipeline will send back a message with a hype If you run the pipeline in [client-mode](/docs/run#operating-modes), pipes will prompt you on the console and wait for your response. -![](/images/docs/build/input_console_select_game.png) +![](/build/input_console_select_game.png) Once you respond, the pipeline will continue. -![](/images/docs/build/play_game_console.png) +![](/build/play_game_console.png) ## Running in Server-Mode @@ -94,7 +94,7 @@ $ flowpipe pipeline run play_a_game --host local Open the URL in your browser. The form appears. -![](/images/docs/build/input_http_select_game.png) +![](/build/input_http_select_game.png) Select a game and then click the **Submit** button. Return to the terminal where you are running the pipeline. You will see that the pipeline is now finished and the message appears in the output: @@ -142,4 +142,4 @@ notifier "default" { The pipeline that we created earlier already routes the input request to the default notifier. By adding integrations to the default notifier we can route the input request to Slack and/or email without modifying the pipeline! -![](/images/docs/build/input_slack_select_game.png) +![](/build/input_slack_select_game.png) diff --git a/docs/flowpipe-hcl/step/input.md b/docs/flowpipe-hcl/step/input.md index 79b3f59..540ed0c 100644 --- a/docs/flowpipe-hcl/step/input.md +++ b/docs/flowpipe-hcl/step/input.md @@ -91,14 +91,14 @@ This step also supports the [common step arguments](/docs/flowpipe-hcl/step#comm ### Button - Simple ##### Console (Client-Mode) -![](/images/docs/flowpipe-hcl/input_button_simple_console.png) +![](/flowpipe-hcl/input_button_simple_console.png) ##### HTTP -![](/images/docs/flowpipe-hcl/input_button_simple_http.png) +![](/flowpipe-hcl/input_button_simple_http.png) ##### Slack -![](/images/docs/flowpipe-hcl/input_button_simple_slack.png) +![](/flowpipe-hcl/input_button_simple_slack.png) ```hcl @@ -126,13 +126,13 @@ pipeline "my_pipe" { ### Button - With labels and values ##### Console (Client-Mode) -![](/images/docs/flowpipe-hcl/input_button_simple_console.png) +![](/flowpipe-hcl/input_button_simple_console.png) ##### HTTP -![](/images/docs/flowpipe-hcl/input_button_simple_http.png) +![](/flowpipe-hcl/input_button_simple_http.png) ##### Slack -![](/images/docs/flowpipe-hcl/input_button_simple_slack.png) +![](/flowpipe-hcl/input_button_simple_slack.png) ```hcl @@ -167,14 +167,14 @@ pipeline "my_pipe" { ### Select - basic ##### Console (Client-Mode) -![](/images/docs/flowpipe-hcl/input_select_simple_console.png) +![](/flowpipe-hcl/input_select_simple_console.png) ##### HTTP -![](/images/docs/flowpipe-hcl/input_select_simple_http_open.png) +![](/flowpipe-hcl/input_select_simple_http_open.png) ##### Slack -![](/images/docs/flowpipe-hcl/input_select_simple_slack_open.png) +![](/flowpipe-hcl/input_select_simple_slack_open.png) ```hcl @@ -208,13 +208,13 @@ pipeline "my_select" { #### Select - with labels & default selection ##### Console (Client-Mode) -![](/images/docs/flowpipe-hcl/input_select_labels_console.png) +![](/flowpipe-hcl/input_select_labels_console.png) ##### HTTP -![](/images/docs/flowpipe-hcl/input_select_labels_http_open.png) +![](/flowpipe-hcl/input_select_labels_http_open.png) ##### Slack -![](/images/docs/flowpipe-hcl/input_select_labels_slack_open.png) +![](/flowpipe-hcl/input_select_labels_slack_open.png) ```hcl @@ -257,14 +257,14 @@ pipeline "my_select_labels" { ### Multiselect - basic ##### Console (Client-Mode) -![](/images/docs/flowpipe-hcl/input_multiselect_simple_console.png) +![](/flowpipe-hcl/input_multiselect_simple_console.png) ##### HTTP -![](/images/docs/flowpipe-hcl/input_multiselect_simple_http_selected.png) +![](/flowpipe-hcl/input_multiselect_simple_http_selected.png) ##### Slack -![](/images/docs/flowpipe-hcl/input_multiselect_simple_slack_selected.png) +![](/flowpipe-hcl/input_multiselect_simple_slack_selected.png) ```hcl @@ -299,14 +299,14 @@ pipeline "my_multi" { ### Multiselect with labels & default selection ##### Console (Client-Mode) -![](/images/docs/flowpipe-hcl/input_multiselect_labels_console_selected.png) +![](/flowpipe-hcl/input_multiselect_labels_console_selected.png) ##### HTTP -![](/images/docs/flowpipe-hcl/input_multiselect_labels_http_selected.png) +![](/flowpipe-hcl/input_multiselect_labels_http_selected.png) ##### Slack -![](/images/docs/flowpipe-hcl/input_multiselect_labels_slack_selected.png) +![](/flowpipe-hcl/input_multiselect_labels_slack_selected.png) ```hcl diff --git a/docs/flowpipe-hcl/trigger/http.md b/docs/flowpipe-hcl/trigger/http.md index fbe54e1..809db07 100644 --- a/docs/flowpipe-hcl/trigger/http.md +++ b/docs/flowpipe-hcl/trigger/http.md @@ -87,7 +87,7 @@ trigger "http" "my_webhook" { Flowpipe creates an endpoint on the flowpipe server for each `http` trigger. The HTTP webhook does not support any authentication mechanism, but it does have a URL with randomness to make it unguessable. The webhook URL path is: `/api/latest/hook/{trigger HCL label}/{random string}`, eg `/api/latest/hook/my_webhook/21ifp8truzi8y2r29jdl0qi7qt` -The webhook URL will remain consistent across restarts. The {random string} is generated using the trigger name (the block label of the `trigger` ) and a global salt value. +The webhook URL will remain consistent across restarts. The {random string} is generated using the trigger name (the block label of the `trigger` ) and a global salt value. - Because the URL contains the trigger name, changing the trigger name will generate a new URL. - The salt value is stored in `~/.flowpipe/internal/salt` - If the file is missing or empty, flowpipe will randomly generate a new salt and write it there. If you want to change *all* of your webhook URLs, remove the salt value. diff --git a/docs/learn.md b/docs/learn.md index f7fac22..cb03623 100644 --- a/docs/learn.md +++ b/docs/learn.md @@ -55,7 +55,7 @@ Let's run it! flowpipe pipeline run learn_flowpipe ``` -![](/images/docs/learn/get-ipv4.png) +![](/learn/get-ipv4.png) Flowpipe runs the pipeline and prints its outputs once it is complete. @@ -65,7 +65,7 @@ When troubleshooting, it's often useful to view more information about the curre flowpipe pipeline run learn_flowpipe --verbose ``` -![](/images/docs/learn/get-ipv4-verbose.png) +![](/learn/get-ipv4-verbose.png) ## Using mods @@ -102,7 +102,7 @@ You can run pipelines from the dependency mod on the command line: flowpipe pipeline run reallyfreegeoip.pipeline.get_ip_geolocation --arg ip_address=35.236.238.30 ``` -![](/images/docs/learn/reallyfreegeoip.png) +![](/learn/reallyfreegeoip.png) ## Composing with pipelines @@ -201,7 +201,7 @@ pipeline "learn_flowpipe" { } ``` -![](/images/docs/learn/weather-report.png) +![](/learn/weather-report.png) @@ -239,5 +239,5 @@ flowpipe server & flowpipe pipeline run learn_flowpipe --host local ``` -![](/images/docs/learn/slack-weather-report.png) +![](/learn/slack-weather-report.png) diff --git a/docs/reference/cli/index.md b/docs/reference/cli/index.md index c8cd132..520e62a 100644 --- a/docs/reference/cli/index.md +++ b/docs/reference/cli/index.md @@ -31,20 +31,23 @@ sidebar_label: Flowpipe CLI ## Global Flags + + + - + - + @@ -52,59 +55,60 @@ sidebar_label: Flowpipe CLI - + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + - + - + +
Flag Description
--config-path `--config-path` - Sets the search path for configuration files. This argument accepts a colon-separated list of directories. All configuration files (*.fpc) will be loaded from each path, with decreasing precedence. The default is .:$FLOWPIPE_INSTALL_DIR/config (.:~/.flowpipe/config). This allows you to manage your workspaces and connections centrally in the ~/.flowpipe/config directory, but override them in the working directory / mod location if desired. + Sets the search path for configuration files. This argument accepts a colon-separated list of directories. All configuration files (`*.fpc`) will be loaded from each path, with decreasing precedence. The default is `.:$FLOWPIPE_INSTALL_DIR/config` (`.:~/.flowpipe/config`). This allows you to manage your workspaces and connections centrally in the `~/.flowpipe/config` directory, but override them in the working directory / mod location if desired.
--data-dir `--data-dir` Sets the event store data directory. Flowpipe defaults to the `.flowpipe` directory in the current mod directory. This argument allows you to specify a different directory.
-h, --help `-h`, `--help` Help for Flowpipe.
--host Run the command against a local or remote server instance. You may specify the full host and port (e.g. --host https://flowpipe.my-org.com:7103), or use the keyword local to connect to the local server instance as a shortcut for https://localhost:7103 (e.g. --host local) `--host` Run the command against a local or remote server instance. You may specify the full host and port (e.g. `--host https://flowpipe.my-org.com:7103`), or use the keyword `local` to connect to the local server instance as a shortcut for `https://localhost:7103` (e.g. `--host local`)
--input Enable interactive prompts (default true). `--input` Enable interactive prompts (default `true`).
--max-concurrency-container int Set the maximum number of container step instances that can execute concurrently across all pipeline instances (default 25). `--max-concurrency-container int` Set the maximum number of `container` step instances that can execute concurrently across all pipeline instances (default `25`).
--max-concurrency-function int Set the maximum number of function step instances that can execute concurrently across all pipeline instances (default 50). `--max-concurrency-function int` Set the maximum number of `function` step instances that can execute concurrently across all pipeline instances (default `50`).
--max-concurrency-http int Set the maximum number of http step instances that can execute concurrently across all pipeline instances (default 500). `--max-concurrency-http int` Set the maximum number of `http` step instances that can execute concurrently across all pipeline instances (default `500`).
--max-concurrency-query int Set the maximum number of query step instances that can execute concurrently across all pipeline instances (default 50). `--max-concurrency-query int` Set the maximum number of `query` step instances that can execute concurrently across all pipeline instances (default `50`).
--mod-location `--mod-location` Sets the Flowpipe workspace working directory. If not specified, the workspace directory will be set to the current working directory. See FLOWPIPE_MOD_LOCATION for details.
--output Select a console output format: pretty, plain, yaml or json (default pretty). `--output` Select a console output format: `pretty`, `plain`, `yaml` or `json` (default `pretty`).
-v, --version `-v`, `--version` Display Flowpipe version.
--workspace `--workspace ` Sets the Flowpipe workspace profile. If not specified, the default workspace will be used if it exists. See FLOWPIPE_WORKSPACE for details.
@@ -113,12 +117,12 @@ sidebar_label: Flowpipe CLI