diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..5211f2e --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,20 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +# Modifications copyright (c) Enthought, Inc. +# SPDX-License-Identifier: BSD-3-Clause + +default: testacc + +# Run acceptance tests +.PHONY: testacc +testacc: + TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m + +# Generate Quay API +.PHONY: generate-quay-api +generate-quay-api: + openapi-generator generate --generator-name go --git-user-id enthought --git-repo-id terraform-provider-quay --additional-properties=packageName=quay_api,isGoSubmodule=true --skip-validate-spec --input-spec code_generator/quay_api.json --output quay_api && \ + gofmt -w quay_api && \ + cd quay_api && \ + go mod tidy diff --git a/README.md b/README.md new file mode 100644 index 0000000..b16468f --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# terraform-provider-quay +Terraform provider for the [Quay Project](https://github.com/quay/quay). + +Please visit the Terraform registry site for instructions on how to use the provider: + +https://registry.terraform.io/providers/enthought/quay/latest/docs + +## Developer Instructions +### Build Documentation +The documentation should be updated every time the provider code is changed. +```bash +go generate . +``` + +### Run Tests +```bash +export QUAY_URL="https://quay.example.com" +export QUAY_TOKEN="" +make testacc +``` + +### Generate Quay API +```bash +make generate-quay-api +``` diff --git a/generate_quay_api.sh b/generate_quay_api.sh deleted file mode 100644 index a64825f..0000000 --- a/generate_quay_api.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -openapi-generator generate --generator-name go --git-user-id enthought --git-repo-id terraform-provider-quay --additional-properties=packageName=quay_api,isGoSubmodule=true --skip-validate-spec --input-spec code_generator/quay_api.json --output quay_api -gofmt -w quay_api -cd quay_api -go mod tidy