Initial commit
This commit is contained in:
commit
e4c8a6fbf4
186 changed files with 29501 additions and 0 deletions
36
Makefile
Normal file
36
Makefile
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
ROOT_DIR ?= $(shell git rev-parse --show-toplevel)
|
||||
SCRIPTS_BASE ?= $(ROOT_DIR)/scripts
|
||||
|
||||
# SETUP AND TOOL INITIALIZATION TASKS
|
||||
project-help:
|
||||
@$(SCRIPTS_BASE)/project.sh help
|
||||
|
||||
project-tools:
|
||||
@$(SCRIPTS_BASE)/project.sh tools
|
||||
|
||||
# LINT
|
||||
lint-golangci-lint:
|
||||
@echo "Linting with golangci-lint"
|
||||
@$(SCRIPTS_BASE)/lint-golangci-lint.sh
|
||||
|
||||
lint-tf:
|
||||
@echo "Linting examples"
|
||||
@terraform fmt -check -diff -recursive examples
|
||||
|
||||
lint: lint-golangci-lint lint-tf
|
||||
|
||||
# DOCUMENTATION GENERATION
|
||||
generate-docs:
|
||||
@echo "Generating documentation with tfplugindocs"
|
||||
@$(SCRIPTS_BASE)/tfplugindocs.sh
|
||||
|
||||
# TEST
|
||||
test:
|
||||
@echo "Running tests for the terraform provider"
|
||||
@cd $(ROOT_DIR)/stackit && go test ./... -count=1 && cd $(ROOT_DIR)
|
||||
|
||||
test-acceptance-tf:
|
||||
@if [ -z $(TF_ACC_PROJECT_ID) ]; then echo "Input TF_ACC_PROJECT_ID missing"; exit 1; fi
|
||||
@echo "Running acceptance tests for the terraform provider"
|
||||
@cd $(ROOT_DIR)/stackit && TF_ACC=1 TF_ACC_PROJECT_ID=$(TF_ACC_PROJECT_ID) go test ./... -count=1 -timeout=30m && cd $(ROOT_DIR)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue