Skip to content
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

Update project settings #32

Merged
merged 4 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
service/phone:
- changed-files:
- any-glob-to-any-file: internal/services/phone/**/*
service/user:
- changed-files:
- any-glob-to-any-file: internal/services/user/**/*
spec:
- changed-files:
- any-glob-to-any-file: spec/**/*
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
TEST?=$$(go list ./... |grep -v 'vendor')
DEV := folio-sec
PROVIDER := zoom
# VERSION := $(shell git describe --abbrev=0 --tags --match "v*")
VERSION := v0.0.1
VERSION := v$(shell cat version)
PLUGINS := ${HOME}/bin/plugins/registry.terraform.io/${DEV}/${PROVIDER}
BIN := terraform-provider-zoom_${VERSION}

Expand Down Expand Up @@ -61,7 +60,7 @@ build:
@mkdir -p dist
go build -o dist/${BIN} .

# Run go build. Output to dist/.
# Run go build. Move artifact to terraform plugins dir
.PHONY: build_override
build_override: build
mkdir -p ${PLUGINS}
Expand Down
76 changes: 71 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
- Examples (`examples/`) and generated documentation (`docs/`),
- Miscellaneous meta files.

## Documentation

Full, comprehensive documentation is available on the [Terraform Registory](https://registry.terraform.io/providers/folio-sec/zoom). [API documentation](https://developers.zoom.us/docs/api/) is also available for non-Terraform or service specific information.

## Requirements

- [Terraform](https://developer.hashicorp.com/terraform/downloads)
- [Go](https://golang.org/doc/install)
- [Node.js](https://nodejs.org/en/download/package-manager) (to patch Open API Specification files)

## Building The Provider

Expand Down Expand Up @@ -68,14 +73,75 @@ In order to run the full suite of Acceptance tests, run `make testacc`.

## Debugging the Provider

Setup your zoom application from https://marketplace.zoom.us/user/build then get the secrets beforehand.

### Case 1. Local install

You can debug developing provider using following steps:

1. `make local_install`
1. Edit `~/.terraformrc` using the output comment
1. `cd examples/resources/zoom_phone_autoreceiptionist`
1. `TF_LOG_PROVIDER=debug terraform apply`

### Case 2. Using Visual Studio Code

You can debug developing provider using following steps:

- Setup your zoom application from https://marketplace.zoom.us/user/build then get the secrets.
- `make local_install`
- Edit `~/.terraformrc` using the output comment
- `cd examples/resources/zoom_phone_autoreceiptionist`
- `TF_LOG_PROVIDER=debug terraform apply`
1. Launch your Visual Studio Code app
1. Select `Debug Terraform Provier` configuration and start a debugging session from "Run and Debug" view
1. Copy a `TF_REATTACH_PROVIDERS={...}` output from "Debug Console" tab
1. `cd examples/resources/zoom_phone_autoreceiptionist`
1. `TF_REATTACH_PROVIDERS={...} TF_LOG_PROVIDER=debug terraform apply`

## Release

We use release management by [tagpr](https://github.com/Songmu/tagpr). When merging tagpr PR, next version would be released by github-actions.

## Contribution

See also [CONTRIBUTING.md](CONTRIBUTING.md).

### DCO Sign-Off Methods

The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch.

The DCO requires a sign-off message in the following format appear on each commit in the pull request:

```txt
Signed-off-by: Sample Developer [email protected]
```

The text can either be manually added to your commit body, or you can add either `-s` or `--signoff` to your usual `git` commit commands.

#### Auto sign-off

The following method is examples only and are not mandatory.

```sh
touch .git/hooks/prepare-commit-msg
chmod +x .git/hooks/prepare-commit-msg
```

Edit the `prepare-commit-msg` file like:

```sh
#!/bin/sh

name=$(git config user.name)
email=$(git config user.email)

if [ -z "${name}" ]; then
echo "empty git config user.name"
exit 1
fi

if [ -z "${email}" ]; then
echo "empty git config user.email"
exit 1
fi

git interpret-trailers --if-exists doNothing --trailer \
"Signed-off-by: ${name} <${email}>" \
--in-place "$1"
```
krrrr38 marked this conversation as resolved.
Show resolved Hide resolved