-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial pipelines and mod files (#2)
Co-authored-by: Jon Udell <[email protected]> Co-authored-by: Cody Bruno <[email protected]> Co-authored-by: raj <[email protected]>
- Loading branch information
1 parent
eef86d3
commit 401bfc7
Showing
22 changed files
with
848 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**Flowpipe version (`flowpipe -v`)** | ||
Example: v0.3.0 | ||
|
||
**To reproduce** | ||
Steps to reproduce the behavior (please include relevant code and/or commands). | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Questions | ||
url: https://turbot.com/community/join | ||
about: Jira issues in this repository are only intended for bug reports and feature requests. Other issues will be closed. Please ask and answer questions through the Turbot Slack community. | ||
- name: Flowpipe CLI Bug Reports and Feature Requests | ||
url: https://github.com/turbot/flowpipe/issues/new/choose | ||
about: Flowpipe CLI has its own codebase. Bug reports and feature requests for those pieces of functionality should be directed to that repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
### Checklist | ||
- [ ] Issue(s) linked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Stale Issues and PRs | ||
on: | ||
schedule: | ||
- cron: "30 23 * * *" | ||
workflow_dispatch: | ||
inputs: | ||
dryRun: | ||
description: Set to true for a dry run | ||
required: false | ||
default: "false" | ||
type: string | ||
|
||
jobs: | ||
stale_workflow: | ||
uses: turbot/steampipe-workflows/.github/workflows/stale.yml@main | ||
with: | ||
dryRun: ${{ github.event.inputs.dryRun }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Sync Labels | ||
on: | ||
schedule: | ||
- cron: "30 22 * * 1" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync_labels_workflow: | ||
uses: turbot/steampipe-workflows/.github/workflows/sync-labels.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Swap files | ||
*.swp | ||
|
||
# Ignore Apple custom attributes file | ||
.DS_Store | ||
|
||
# Flowpipe variable files | ||
*.pvars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,94 @@ | ||
# flowpipe-mod-jira | ||
# Jira Mod for Flowpipe | ||
|
||
A collection of [Flowpipe](https://flowpipe.io) pipelines that can be used to: | ||
- Create issues | ||
- Update issues | ||
- Delete issues | ||
- And more! | ||
|
||
![image](https://github.com/turbot/flowpipe-mod-jira/blob/staging/docs/images/flowpipe_test_run.png?raw=true) | ||
|
||
## Documentation | ||
|
||
- **[Pipelines →](https://hub.flowpipe.io/mods/turbot/jira/pipelines)** | ||
- **[Triggers →](https://hub.flowpipe.io/mods/turbot/jira/triggers)** | ||
|
||
## Getting started | ||
|
||
### Installation | ||
|
||
Download and install Flowpipe (https://flowpipe.io/downloads). Or use Brew: | ||
|
||
```sh | ||
brew tap turbot/tap | ||
brew install flowpipe | ||
``` | ||
|
||
Clone: | ||
|
||
```sh | ||
git clone https://github.com/turbot/flowpipe-mod-jira.git | ||
cd flowpipe-mod-jira | ||
``` | ||
|
||
### Configuration | ||
|
||
Configure your credentials: | ||
|
||
```sh | ||
cp flowpipe.pvars.example flowpipe.pvars | ||
vi flowpipe.pvars | ||
``` | ||
|
||
It's recommended to configure credentials through [input variables](https://flowpipe.io/docs/using-flowpipe/mod-variables) by setting them in the `flowpipe.pvars` file. | ||
|
||
**Note:** Credentials can also be passed in each pipeline run with `--pipeline-args access_token=N887JaasasasaVMsdJBB6B`. | ||
|
||
Additional input variables may be defined in the mod's `variables.hcl` file that can be configured to better match your environment and requirements. | ||
|
||
Variables with defaults set do not need to be explicitly set, but it may be helpful to override them. | ||
|
||
### Usage | ||
|
||
Start your server to get started: | ||
|
||
```sh | ||
flowpipe service start | ||
``` | ||
|
||
Run a pipeline: | ||
|
||
```sh | ||
flowpipe pipeline run list_issues | ||
``` | ||
|
||
## Passing pipeline arguments | ||
|
||
To pass values into pipeline [parameters](https://flowpipe.io/docs/using-flowpipe/pipeline-parameters), use the following syntax: | ||
|
||
```sh | ||
flowpipe pipeline run list_issues --pipeline-arg project_key="SBT" | ||
``` | ||
|
||
Multiple pipeline args can be passed in with separate `--pipeline-arg` flags. | ||
|
||
For more information on passing arguments, please see [Pipeline Args](https://flowpipe.io/docs/using-flowpipe/pipeline-arguments). | ||
|
||
## Contributing | ||
|
||
If you have an idea for additional controls or just want to help maintain and extend this mod ([or others](https://github.com/topics/flowpipe-mod)) we would love you to join the community and start contributing. | ||
|
||
- **[Join #flowpipe in our Slack community ](https://flowpipe.io/community/join)** | ||
|
||
Please see the [contribution guidelines](https://github.com/turbot/flowpipe/blob/main/CONTRIBUTING.md) and our [code of conduct](https://github.com/turbot/flowpipe/blob/main/CODE_OF_CONDUCT.md). | ||
|
||
Want to help but not sure where to start? Pick up one of the `help wanted` issues: | ||
|
||
- [Flowpipe](https://github.com/turbot/flowpipe/labels/help%20wanted) | ||
- [Jira Mod](https://github.com/turbot/flowpipe-mod-jira/labels/help%20wanted) | ||
|
||
## License | ||
|
||
This mod is licensed under the [Apache License 2.0](https://github.com/turbot/flowpipe-mod-jira/blob/main/LICENSE). | ||
|
||
Flowpipe is licensed under the [AGPLv3](https://github.com/turbot/flowpipe/blob/main/LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
repository: "https://github.com/turbot/flowpipe-mod-jira" | ||
--- | ||
|
||
# Jira Mod for Flowpipe | ||
|
||
A collection of [Flowpipe](https://flowpipe.io) pipelines that can be used to: | ||
- Create issues | ||
- Update issues | ||
- Delete issues | ||
- And more! | ||
|
||
## Documentation | ||
|
||
- **[Pipelines →](https://hub.flowpipe.io/mods/turbot/jira/pipelines)** | ||
- **[Triggers →](https://hub.flowpipe.io/mods/turbot/jira/triggers)** | ||
|
||
## Getting started | ||
|
||
### Installation | ||
|
||
Download and install Flowpipe (https://flowpipe.io/downloads). Or use Brew: | ||
|
||
```sh | ||
brew tap turbot/tap | ||
brew install flowpipe | ||
``` | ||
|
||
Clone: | ||
|
||
```sh | ||
git clone https://github.com/turbot/flowpipe-mod-jira.git | ||
cd flowpipe-mod-jira | ||
``` | ||
|
||
### Configuration | ||
|
||
Configure your credentials: | ||
|
||
```sh | ||
cp flowpipe.pvars.example flowpipe.pvars | ||
vi flowpipe.pvars | ||
``` | ||
|
||
It's recommended to configure credentials through [input variables](https://flowpipe.io/docs/using-flowpipe/mod-variables) by setting them in the `flowpipe.pvars` file. | ||
|
||
**Note:** Credentials can also be passed in each pipeline run with `--pipeline-args access_token=N887JaasasasaVMsdJBB6B`. | ||
|
||
Additional input variables may be defined in the mod's `variables.hcl` file that can be configured to better match your environment and requirements. | ||
|
||
Variables with defaults set do not need to be explicitly set, but it may be helpful to override them. | ||
|
||
### Usage | ||
|
||
Start the Flowpipe server to get started: | ||
|
||
```sh | ||
flowpipe service start | ||
``` | ||
|
||
Run a pipeline: | ||
|
||
Run a pipeline: | ||
|
||
```sh | ||
flowpipe pipeline run list_issues | ||
``` | ||
|
||
## Passing pipeline arguments | ||
|
||
To pass values into pipeline [parameters](https://flowpipe.io/docs/using-flowpipe/pipeline-parameters), use the following syntax: | ||
|
||
```sh | ||
flowpipe pipeline run list_issues --pipeline-arg project_key="SBT" | ||
``` | ||
|
||
Multiple pipeline args can be passed in with separate `--pipeline-arg` flags. | ||
|
||
For more information on passing arguments, please see [Pipeline Args](https://flowpipe.io/docs/using-flowpipe/pipeline-arguments). | ||
|
||
## Contributing | ||
|
||
If you have an idea for additional controls or just want to help maintain and extend this mod ([or others](https://github.com/topics/flowpipe-mod)) we would love you to join the community and start contributing. | ||
|
||
- **[Join #flowpipe in our Slack community ](https://flowpipe.io/community/join)** | ||
|
||
Please see the [contribution guidelines](https://github.com/turbot/flowpipe/blob/main/CONTRIBUTING.md) and our [code of conduct](https://github.com/turbot/flowpipe/blob/main/CODE_OF_CONDUCT.md). | ||
|
||
Want to help but not sure where to start? Pick up one of the `help wanted` issues: | ||
|
||
- [Flowpipe](https://github.com/turbot/flowpipe/labels/help%20wanted) | ||
- [Jira Mod](https://github.com/turbot/flowpipe-mod-jira/labels/help%20wanted) | ||
|
||
## License | ||
|
||
This mod is licensed under the [Apache License 2.0](https://github.com/turbot/flowpipe-mod-jira/blob/main/LICENSE). | ||
|
||
Flowpipe is licensed under the [AGPLv3](https://github.com/turbot/flowpipe/blob/main/LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Jira api_base_url, token, user_email and project_key | ||
api_base_url="your-jira-base-url" | ||
token="your-jira-token" | ||
user_email="your-jira-user-email" | ||
project_key="your-jira-project-key" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Common descriptions | ||
locals { | ||
token_param_description = "Jira API access token." | ||
user_email_param_description = "Email-id of the Jira user." | ||
api_base_url_param_description = "The base URL of the Jira API." | ||
project_key_param_description = "The key identifying the Jira project." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
mod "jira" { | ||
title = "Jira" | ||
description = "Run pipelines to supercharge your Jira triggers using Flowpipe." | ||
color = "#2684FF" | ||
documentation = file("./docs/index.md") | ||
icon = "/images/flowpipe/mods/turbot/jira.svg" | ||
categories = ["jira"] | ||
|
||
opengraph { | ||
title = "Jira Library Mod for Flowpipe" | ||
description = "Run pipelines and triggers that interact with Jira." | ||
image = "/images/flowpipe/mods/turbot/jira-social-graphic.png" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
pipeline "add_comment" { | ||
title = "Add comment to the Issue" | ||
description = "Add comment to the issue." | ||
|
||
param "api_base_url" { | ||
type = string | ||
description = local.api_base_url_param_description | ||
default = var.api_base_url | ||
} | ||
|
||
param "token" { | ||
type = string | ||
description = local.token_param_description | ||
default = var.token | ||
# TODO: Add once supported | ||
# sensitive = true | ||
} | ||
|
||
param "user_email" { | ||
type = string | ||
description = local.user_email_param_description | ||
default = var.user_email | ||
} | ||
|
||
param "issue_id" { | ||
type = string | ||
description = "Issue ID." | ||
} | ||
|
||
param "comment_text" { | ||
type = string | ||
description = "Issue comment." | ||
} | ||
|
||
step "http" "add_comment" { | ||
method = "post" | ||
url = "${param.api_base_url}/rest/api/2/issue/${param.issue_id}/comment" | ||
request_headers = { | ||
Content-Type = "application/json" | ||
} | ||
|
||
basic_auth { | ||
username = param.user_email | ||
password = param.token | ||
} | ||
|
||
request_body = jsonencode({ | ||
body = param.comment_text | ||
}) | ||
} | ||
|
||
output "status" { | ||
description = "Details about the issue comment." | ||
value = step.http.add_comment.response_body | ||
} | ||
} |
Oops, something went wrong.