Skip to content

Add initial tables and sources #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 187 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
4ebc77a
compiles with dev version of sdk
kaidaguerre Jun 19, 2024
c1f8705
go.sum
kaidaguerre Jun 19, 2024
2a69531
working on it
kaidaguerre Jun 19, 2024
53225c6
collection works
kaidaguerre Jun 24, 2024
8062555
split into source and collection
kaidaguerre Jun 25, 2024
4cb2ec8
starting to add GetSchema
kaidaguerre Jun 26, 2024
0356ae8
split into source and collection
kaidaguerre Jun 26, 2024
67ec389
fix enrichment
kaidaguerre Jun 26, 2024
30ca9b9
- rename EnrichmentFields to CommonFields
kaidaguerre Jul 2, 2024
c66b3d1
remove sleep
kaidaguerre Jul 3, 2024
ec6a4bb
Initial flowlog implementation
kaidaguerre Jul 9, 2024
ef8151d
tidy upelection of collections to minimise hard coding
kaidaguerre Jul 10, 2024
7b83431
define composable artifact source
kaidaguerre Jul 12, 2024
f1910f2
implement simplified artifact loader/mapper
kaidaguerre Jul 12, 2024
98a2bf7
artifact source and mapper working
kaidaguerre Jul 12, 2024
eba40a9
Readd Identifier to Collection
kaidaguerre Jul 12, 2024
882f2b6
linting fixes
kaidaguerre Jul 15, 2024
ea7c179
adding support for cloudwatch source
kaidaguerre Jul 15, 2024
1cf8fc3
Add support for implicit Artifact loader selection based on file type
kaidaguerre Jul 16, 2024
4852288
Update FlowLogCollectionConfig to init default fields
kaidaguerre Jul 16, 2024
6e2ae68
execution id and dest path are passed in context - do not pass req ar…
kaidaguerre Jul 17, 2024
d6d2f1f
initial support for paging data
kaidaguerre Jul 22, 2024
a3c184a
tidy naming, ensure interface functions are implemented
kaidaguerre Jul 23, 2024
17cfe64
tidy naming, ensure interface functions are implemented
kaidaguerre Jul 23, 2024
0cbdb96
fix: Makefile
graza-io Jul 25, 2024
4b4ba3d
comments
kaidaguerre Jul 25, 2024
5795000
tidy
kaidaguerre Jul 25, 2024
a658300
Add GetPagingData to RowSource if
kaidaguerre Jul 29, 2024
5a9a7a2
go.mod
kaidaguerre Jul 30, 2024
156da4a
remove parquet 'ignore' tag from common fields in row structs
kaidaguerre Jul 30, 2024
e30c3e8
working on config parsing
kaidaguerre Jul 29, 2024
977238b
working on it
kaidaguerre Jul 30, 2024
7f85a66
move CloudwatchSource to aws plugin
kaidaguerre Jul 30, 2024
9b28494
split up artifact packae into artifact_source, artifact_loader, artif…
kaidaguerre Jul 31, 2024
d4c1918
remove resource registration/factory from plugin
kaidaguerre Jul 31, 2024
b69f1c2
remove SourceConfigBase
kaidaguerre Jul 31, 2024
89677d7
started to refactor artifact source
kaidaguerre Jul 31, 2024
69c1d10
inversion compiles
kaidaguerre Jul 31, 2024
b8373ce
fix: Cloudtrail collection requeats CloudtrailMapper not CloudwatchMa…
kaidaguerre Aug 1, 2024
ba949e8
remove SupportedSources from Collection if (for now)
kaidaguerre Aug 1, 2024
9c5364f
re-add GetConfigSchema to collection and source
kaidaguerre Aug 1, 2024
85c27a2
wip: elb access logs
graza-io Aug 2, 2024
021f785
feat: elb access logs
graza-io Aug 5, 2024
fe2d58f
fix: fixed incorrect check for value on matched_rule_priority
graza-io Aug 5, 2024
f9d140c
refactor: reduced number of parsers we instantiate
graza-io Aug 5, 2024
de16ebb
Merge pull request #3 from turbot/elb
graza-io Aug 5, 2024
c893f70
feat: s3 server access logs
graza-io Aug 5, 2024
33a4648
feat: lambda logs
graza-io Aug 6, 2024
878b3ab
fix: cloudtrail log config
graza-io Aug 9, 2024
02211ea
Tidy
cbruno10 Aug 13, 2024
669dd11
Update to go 1.23
cbruno10 Aug 20, 2024
21b8b69
Update Makefile
cbruno10 Aug 20, 2024
e4f1e26
Rename collection to partition (#4)
kaidaguerre Sep 2, 2024
0d36d36
Update to work with parameterized CollectionState
kaidaguerre Sep 5, 2024
a94fb96
Update default AWS CloudTrail regex so AWS org ID is optional
cbruno10 Sep 6, 2024
1d1bd63
Change partitioning to use tp_date instead of tp_year, tp_month and t…
graza-io Sep 9, 2024
6342011
chore: added goreleaser
graza-io Sep 13, 2024
27292c7
Delete op.log
cbruno10 Sep 13, 2024
2b25f6b
Add workflows and issue and PR templates
cbruno10 Sep 13, 2024
81df0a3
chore: updated Makefile
graza-io Sep 13, 2024
5b01504
updated go.mod
graza-io Oct 28, 2024
0c75b69
Updated to use standard structure (#8)
graza-io Oct 30, 2024
59e513a
Move mapper to table, Make mappers and enrich functions generic
kaidaguerre Nov 5, 2024
3cb4046
fix S3ServerAccessLogTable GetRowSchema
kaidaguerre Nov 5, 2024
ebd585b
fix: reverted change to regex
graza-io Nov 5, 2024
84fe5dc
docs: added folder for table docs
graza-io Nov 6, 2024
16dd16f
fix
kaidaguerre Nov 5, 2024
303f26b
remove delay
kaidaguerre Nov 6, 2024
addc23f
Add alb (#12)
judell Nov 7, 2024
6d938ea
refactor enrichment, add initial doc for alb_access_log table (#14)
judell Nov 7, 2024
f480fa0
Add aws_waf_traffic_log table (#10)
misraved Nov 7, 2024
f36072a
Added support for SecurityHub Finding (#11)
ParthaI Nov 7, 2024
c4500db
refactor: moved alb mapper to mappers package
graza-io Nov 7, 2024
8793ad4
Update tables per the latest SDK format (#18)
misraved Nov 8, 2024
c918cce
Renamed the test folder to tests
misraved Nov 8, 2024
bbfb0e4
Add initial queries for aws_cloudtrail_log table
misraved Nov 8, 2024
c354af2
Add aws_cost_and_usage_log table
pskrbasu Nov 8, 2024
ebad04a
add docs and rename cost usage log table
pskrbasu Nov 9, 2024
e0ed3b7
update cost usage log table
pskrbasu Nov 9, 2024
f7be9c7
Update the develop branch with the new set of queries
misraved Nov 9, 2024
4175200
Add table guardduty_finding (#13)
Priyanka-Chatterjee-2000 Nov 12, 2024
1b1b261
move TimeMillis, UnixMillis, JSONString from helpers to types
kaidaguerre Nov 12, 2024
49dd20d
tables and sources must now register themselves
kaidaguerre Nov 13, 2024
ff5fe50
remove unneeded column tags
kaidaguerre Nov 13, 2024
65cf445
fix tpDate
kaidaguerre Nov 13, 2024
6df1854
fix cost usage table
kaidaguerre Nov 13, 2024
f6e6dbc
revert test parquet tag
kaidaguerre Nov 13, 2024
9ecbc43
Update CloudTrail log table naming to be consistent
cbruno10 Nov 14, 2024
960a1d9
remove factory initialisation from NewPlugin
kaidaguerre Nov 14, 2024
7538fee
simplify - remove ctors, use generic creation, add SupportedSources
kaidaguerre Nov 18, 2024
96a556b
refactor: using generic creation approach (#21)
graza-io Nov 19, 2024
0a6acbc
refactor(guardduty): times using time.Time instead of varchar
graza-io Nov 19, 2024
a7573f4
fix: reverted accidental renaming of aws_securityhub_finding_log table
graza-io Nov 19, 2024
2a27143
fix(sechub): added missing mandatory TpFields
graza-io Nov 19, 2024
3c9bc5e
fix: removed unrequired source type setting in cloudtrail enricher
graza-io Nov 19, 2024
c29173e
chore: removed unrequired tppartion setting in vpc flow log table
graza-io Nov 19, 2024
01a31bd
feat: aws connections (#27)
graza-io Nov 22, 2024
b1c01f7
refactor: JSON columns now JSON not JSONString (#28)
graza-io Nov 24, 2024
f6a8005
- remove TableImpl
kaidaguerre Nov 25, 2024
06cebc6
feat: added AWS based sources and collection state (#29)
graza-io Nov 26, 2024
88cda2b
Extractor (#30)
graza-io Nov 27, 2024
5b44afc
refactor: using struct columns where possible. Closes #31 (#32)
graza-io Dec 1, 2024
5bceac9
refactor updated structs
graza-io Dec 2, 2024
6051a2c
fix: remediated CloudWatch source for CloudTrail table. Closes #33 (#34)
graza-io Dec 4, 2024
07a7839
Added validation for S3 Bucket Source configuration. Closes #22 (#38)
graza-io Dec 5, 2024
af0eb9f
fix: typo
graza-io Dec 5, 2024
012adae
added tpsourcelocation to cloudwatchsource
graza-io Dec 5, 2024
b2eca0f
fix: fixed pagination in CloudWatch now correctly obtains pages (#39)
graza-io Dec 5, 2024
144f62b
logging
kaidaguerre Dec 5, 2024
99bcf52
refactor(cloudwatch): CloudWatch LogGroup Source is now API not Artif…
graza-io Dec 5, 2024
3a9f506
Add Build and Deploy OCI Image workflow
pskrbasu Dec 6, 2024
9a27551
removed uused table config from alb table
graza-io Dec 6, 2024
0ad8a1b
fix: types on aws_cloudtrail_log table
graza-io Dec 6, 2024
888ae06
refactor(guardduty): added missing field(s) to aws_guardduty_finding …
graza-io Dec 6, 2024
bafd0a7
refactor: removed duplicate value
graza-io Dec 9, 2024
b2c4eb6
docs: added placeholder table/source docs and wip index doc (#45)
graza-io Dec 9, 2024
453b67e
Dynamic update (#46)
kaidaguerre Dec 10, 2024
7cb96d3
Clean up the table code (#47)
ParthaI Dec 10, 2024
d0765fc
Updated the DetailFindings property of aws_securityhub_finding to Go …
ParthaI Dec 11, 2024
24a4288
s3_source_config make extensions optional
graza-io Dec 12, 2024
5f4544c
refactor(cloudwatch): removed unused rate limiter on cloudwatch source
graza-io Dec 18, 2024
4c1f442
Update for SDK custom table changes: remove table configs, update sig…
kaidaguerre Jan 2, 2025
08b1e0d
Initial README draft
cbruno10 Jan 3, 2025
8e2c4fa
Add connection in README example
cbruno10 Jan 3, 2025
6d186ef
Minor README updates
cbruno10 Jan 6, 2025
dd74311
Update AWS CloudTrail log examples
cbruno10 Jan 8, 2025
570a7c5
Update to support SDK changes for external plugin source (#50)
kaidaguerre Jan 9, 2025
39f5aed
Add new table examples doc
cbruno10 Jan 9, 2025
fe80508
Merge branch 'develop' of github.com:turbot/tailpipe-plugin-aws into …
cbruno10 Jan 9, 2025
a335a58
Add placeholder descriptions to example queries
cbruno10 Jan 9, 2025
ebd91b1
Discovery updates (#54)
graza-io Jan 14, 2025
c6c1715
Update README, index doc, table, and source docs for better readabili…
cbruno10 Jan 15, 2025
b02fec2
refactor: tidied up default filelayouts to use more standardised names
graza-io Jan 15, 2025
c577b61
fix: prefix correctly applied to s3 walking algo
graza-io Jan 15, 2025
04d8d36
chore: go.mod update
graza-io Jan 15, 2025
f390eb2
refactor(cloudwatch): updated to use from time opposed to config
graza-io Jan 15, 2025
d7df260
update cloudwatch collection state
kaidaguerre Jan 15, 2025
b214f55
Update timerange collection state
kaidaguerre Jan 15, 2025
1121197
fix: cw collection state
graza-io Jan 15, 2025
a51daee
Fix bad formatting in aws_s3_bucket doc args table
cbruno10 Jan 15, 2025
194d10e
Add GetStartTime() Clear() and SetEndTime() to CollectionState IF
kaidaguerre Jan 15, 2025
4afbb26
refactor(source): S3 Bucket Source no longer requires Region to be sp…
graza-io Jan 16, 2025
824793c
refactor: amended S3 source to use optional segments
graza-io Jan 17, 2025
3502183
logging
kaidaguerre Jan 21, 2025
f4f4d21
Add DownloadedArtifactInfo with LocalName and size - this is what Loa…
kaidaguerre Jan 21, 2025
10104ad
Update README and index doc
cbruno10 Jan 22, 2025
41eff38
Update aws_cloudtrail_log index doc and aws_s3_bucket source doc
cbruno10 Jan 22, 2025
4dfee84
Update various docs with more info and sections
cbruno10 Jan 23, 2025
d452896
Remove unnecessary link in README and index doc
cbruno10 Jan 23, 2025
65f3654
removed unused connection config parameter
graza-io Jan 23, 2025
50ea35d
delete collection state file when saving if empty
kaidaguerre Jan 23, 2025
b97047e
handle collection state deletion error
kaidaguerre Jan 23, 2025
41bfcbc
Remove out of scope tables and sources
cbruno10 Jan 23, 2025
8bfdbf0
Add table and column descriptions
cbruno10 Jan 23, 2025
ce3bfee
Temporarily add top level table docs for Hub build
cbruno10 Jan 23, 2025
6ff887a
Update README and other docs
cbruno10 Jan 24, 2025
a3d8342
Update README with simpler sections
cbruno10 Jan 24, 2025
baaec50
Update table and source docs
cbruno10 Jan 27, 2025
2dfb111
Shorten README and index doc
cbruno10 Jan 27, 2025
d6a4bce
Add screenshots to README and index doc, minor table doc cleanup
cbruno10 Jan 28, 2025
a19c741
Rename aws_cloudrail_log_terminal.png to aws_cloudtrail_log_terminal.png
cbruno10 Jan 28, 2025
4f067d5
Fix image links in README.md
cbruno10 Jan 28, 2025
cc9a20b
Fix screenshot links in index doc
cbruno10 Jan 28, 2025
e369440
Update aws_cloudtrail_log query examples
cbruno10 Jan 28, 2025
060d198
Crop dashboard screenshot
cbruno10 Jan 28, 2025
725cb00
Update README.md
cbruno10 Jan 28, 2025
27c8e3a
Add CC BY-NC-ND license for docs
cbruno10 Jan 28, 2025
2c40eb4
Add more spacing around edges of terminal screenshot
cbruno10 Jan 28, 2025
ebfab3c
Merge branch 'develop' of github.com:turbot/tailpipe-plugin-aws into …
cbruno10 Jan 28, 2025
3e89eea
Add connection link and update query format in README
cbruno10 Jan 28, 2025
78cb875
Add connection credentials to index doc and minor updates to aws_clou…
cbruno10 Jan 28, 2025
32915e8
Create scripts/mfa.sh
cbruno10 Jan 28, 2025
96f5c2e
Add connection args table and add new section to aws_cloudtrail_log t…
cbruno10 Jan 28, 2025
55e06a0
Merge branch 'develop' of github.com:turbot/tailpipe-plugin-aws into …
cbruno10 Jan 28, 2025
f046dfb
Add link to examples in aws_cloudtrail_log table doc
cbruno10 Jan 29, 2025
156b5af
Remove replace for pipe-fittings and tailpipe plugin sdk
kaidaguerre Jan 29, 2025
94e52bf
refactor: removed DefaultRegion / Regions from Connection Config
graza-io Jan 29, 2025
2c9b613
Fix formatting of examples link in aws_cloudtrail_log table documenta…
misraved Jan 29, 2025
0c65759
Small doc fixes
cbruno10 Jan 30, 2025
3f8e2cb
Merge branch 'develop' of github.com:turbot/tailpipe-plugin-aws into …
cbruno10 Jan 30, 2025
ed3f3c0
Use main branch of steampipe-workflows
pskrbasu Jan 30, 2025
6998da8
Remove extra image in index doc
cbruno10 Jan 30, 2025
3ea7a8c
Merge branch 'develop' of github.com:turbot/tailpipe-plugin-aws into …
cbruno10 Jan 30, 2025
f9ee13e
Update plugin structure (#61)
graza-io Jan 30, 2025
f8a1ce2
Refactor AWS connection syntax for consistency in documentation
misraved Jan 30, 2025
335de87
chore: updated to use pipe-fittings v2
graza-io Jan 30, 2025
503663c
Add CHANGELOG for v0.1.0
misraved Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
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.

**Tailpipe version (`tailpipe -v`)**
Example: v0.3.0

**Plugin version (`tailpipe plugin list`)**
Example: v0.5.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.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
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: GitHub 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: Tailpipe CLI Bug Reports and Feature Requests
url: https://github.com/turbot/tailpipe/issues/new/choose
about: Tailpipe CLI has its own codebase. Bug reports and feature requests for those pieces of functionality should be directed to that repository.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request---new-table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Feature request - New table
about: Suggest a new table for this project
title: Add table aws_<log_type>
labels: enhancement, new table
assignees: ''

---

**References**
Add any related links that will help us understand the resource, including vendor documentation, related GitHub issues, and Go SDK documentation.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
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.
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Example query results
<details>
<summary>Results</summary>

```
Add example SQL query results here (please include the input queries as well)
```
</details>
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
pull-request-branch-name:
separator: "-"
labels:
- "dependencies"
14 changes: 14 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- main
pull_request:

jobs:
golangci_lint_workflow:
uses: turbot/steampipe-workflows/.github/workflows/golangci-lint.yml@main
with:
timeout: 20m
14 changes: 14 additions & 0 deletions .github/workflows/registry-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build and Deploy OCI Image

on:
push:
tags:
- 'v*'

jobs:
registry_publish_workflow_ghcr:
uses: turbot/steampipe-workflows/.github/workflows/registry-publish-ghcr.yml@main
secrets: inherit
with:
releaseTimeout: 60m
pipeling: tailpipe
17 changes: 17 additions & 0 deletions .github/workflows/stale.yml
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 }}
9 changes: 9 additions & 0 deletions .github/workflows/sync-labels.yml
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
37 changes: 37 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
- GO111MODULE=on
- GOPRIVATE=github.com/turbot
goos:
- linux
- darwin

goarch:
- amd64
- arm64

id: "tailpipe"
binary: "{{ .ProjectName }}.plugin"
# flags:
# - -tags=netgo

archives:
- format: gz
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
files:
- none*
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
algorithm: sha256
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## v0.1.0 [2025-01-30]

_What's new?_

- New tables added
- [aws_cloudtrail_log](https://hub.tailpipe.io/plugins/turbot/aws/tables/aws_cloudtrail_log)
- New sources added
- [aws_s3_bucket](https://hub.tailpipe.io/plugins/turbot/aws/sources/aws_cloudtrail_log)
66 changes: 31 additions & 35 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
# Paths
PLUGIN_NAME=tailpipe-plugin-aws.so
PLUGIN_DIR=~/.tailpipe/plugins
TAILPIPE_INSTALL_DIR ?= ~/.tailpipe
BUILD_TAGS = netgo
install:
go build -o $(TAILPIPE_INSTALL_DIR)/plugins/hub.tailpipe.io/plugins/turbot/aws@latest/tailpipe-plugin-aws.plugin -tags "${BUILD_TAGS}" *.go

# Build flags
PROD_FLAGS=-buildmode=plugin
DEV_FLAGS=-buildmode=plugin -gcflags='all=-N -l'

# Build in development mode by default
.PHONY: default
default: dev-install

# Production build, optimized
.PHONY: build
build:
go build $(PROD_FLAGS) -o $(PLUGIN_NAME) .

# Development build, removes optimizations to allow debugging
.PHONY: dev
dev:
go build $(DEV_FLAGS) -o $(PLUGIN_NAME) .

# Install the development build
.PHONY: dev-install
dev-install: dev
cp $(PLUGIN_NAME) $(PLUGIN_DIR)

# Run tests
.PHONY: test
test:
go test ./... -v

# Clean up generated files
.PHONY: clean
clean:
rm -f $(PLUGIN_NAME)
## Paths
#PLUGIN_NAME=tailpipe-plugin-aws.plugin
#PLUGIN_DIR=~/.tailpipe/plugins/
#
## Build in development mode by default
#.PHONY: default
#default: install
#
## Production build, optimized
#.PHONY: build
#build:
# go build -o $(PLUGIN_NAME) .
#
## Install the development build
#.PHONY: install
#install: build
# mv $(PLUGIN_NAME) $(PLUGIN_DIR)
#
## Run tests
#.PHONY: test
#test:
# go test ./... -v
#
## Clean up generated files
#.PHONY: clean
#clean:
# rm -f $(PLUGIN_NAME)
Loading