This repository has been archived by the owner on Aug 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Create Makefile #330
Merged
Merged
Create Makefile #330
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,53 @@ | ||
export CQ_PROVIDER_DEBUG=1 | ||
export CQ_REATTACH_PROVIDERS=.cq_reattach | ||
|
||
# install the latest version of CQ | ||
install-cq: | ||
curl -L https://github.com/cloudquery/cloudquery/releases/latest/download/cloudquery_Darwin_x86_64 -o cloudquery | ||
chmod +x ./cloudquery | ||
|
||
install-cq-mac: | ||
curl -L https://github.com/cloudquery/cloudquery/releases/latest/download/cloudquery_Darwin_x86_64 -o cloudquery | ||
chmod +x ./cloudquery | ||
|
||
install-cq-mac: | ||
curl -L https://github.com/cloudquery/cloudquery/releases/latest/download/cloudquery_Darwin_x86_64 -o cloudquery | ||
chmod +x ./cloudquery | ||
|
||
|
||
# build the cq aws provider | ||
build: | ||
go build -o cq-provider-aws | ||
|
||
# build and run the cq aws provider | ||
run: build | ||
roneli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
./cq-provider-aws | ||
|
||
# start a running docker container | ||
start-pg: | ||
docker run -p 5432:5432 -e POSTGRES_PASSWORD=pass -d postgres | ||
|
||
# stop a running docker container | ||
stop-pg: | ||
docker stop $$(docker ps -q --filter ancestor=postgres:latest) | ||
|
||
# connect to pg via cli | ||
pg-connect: | ||
psql -h localhost -p 5432 -U postgres -d postgres | ||
|
||
|
||
|
||
# Run an integration test | ||
# you can pass in a specific test to run by specifying the testName: | ||
# make testName=TestIntegrationElasticbeanstal e2e-test | ||
e2e-test: | ||
INTEGRATION_TESTS=1 TF_VAR_PREFIX=cq-testing TF_APPLY_RESOURCES=0 TF_VAR_SUFFIX=integration go test -timeout 30s -v -run ^$(testName)$$ github.com/cloudquery/cq-provider-aws/resources/integration_tests | ||
|
||
# Generate mocks for mock/unit testing | ||
create-mocks: | ||
go install github.com/golang/mock/mockgen | ||
$(shell PATH=$$PATH:$$(go env GOPATH)/bin && go generate client/services.go) | ||
|
||
# Run a fetch command | ||
fetch: | ||
./cloudquery fetch --dsn "postgres://postgres:pass@localhost:5432/postgres?sslmode=disable" -v |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the difference between
install-cq
,install-cq-mac
(twice). I think we can get the OS and the arch automatically and put it in an env?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can't, how about mac-m1? Or how about this:
(ie. I'm questioning whether it's needed to have it here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left
install-cq
target in there because that is what I use. I would love to support automatically detecting arch and os.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the instructions under this target. When we can support dynamic detection we can replace it with the automated install