Skip to content

Commit

Permalink
Add docs, goreleaser, and GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
steobrien committed Jun 7, 2023
1 parent c68bfd1 commit e6ebd38
Show file tree
Hide file tree
Showing 1,130 changed files with 143,602 additions and 38,356 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
#
# This uses an action (crazy-max/ghaction-import-gpg) that assumes you set your
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
# secret. If you would rather own your own GPG handling, please fork this action
# or use an alternative one for key handling.
#
# You will need to pass the `--batch` flag to `gpg` in your signing step
# in `goreleaser` to indicate this is being used in a non-interactive mode.
#
name: release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version-file: 'go.mod'
cache: true
-
name: Import GPG key
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # v5.2.0
id: import_gpg
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GitHub sets this automatically
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63 changes: 63 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
before:
hooks:
# this is just an example and not a requirement for provider building/publishing
- go mod tidy
builds:
- env:
# goreleaser does not work with CGO, it could also complicate
# usage by users in CI/CD systems like Terraform Cloud where
# they are unable to install libraries.
- CGO_ENABLED=0
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
goos:
- freebsd
- windows
- linux
- darwin
goarch:
- amd64
- '386'
- arm
- arm64
ignore:
- goos: darwin
goarch: '386'
binary: '{{ .ProjectName }}_v{{ .Version }}'
archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
checksum:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
signs:
- artifacts: checksum
args:
# if you are using this in a GitHub action or some other automated pipeline, you
# need to pass the batch flag to indicate its not interactive.
- "--batch"
- "--local-user"
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
changelog:
skip: true
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

Terraform `0.13.x` or greater

Go `1.12.x` or greater
Go `1.18.x` or greater

## Install

```
mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/terraform-providers
git clone https://github.com/tuckner/terraform-provider-tines.git
git clone https://github.com/tines/terraform-provider-tines.git
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-tines
export GO111MODULE="on"
make install
Expand Down
36 changes: 36 additions & 0 deletions docs/data-sources/agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tines_agent Data Source - terraform-provider-tines"
subcategory: ""
description: |-
---

# tines_agent (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `agent_id` (Number)
- `agent_options` (String)
- `agent_type` (String)
- `cron` (String)
- `disabled` (Boolean)
- `keep_events_for` (Number)
- `name` (String)
- `receiver_ids` (List of Number)
- `source_ids` (List of Number)
- `story_id` (Number)
- `timezone` (String)

### Read-Only

- `guid` (String)
- `id` (String) The ID of this resource.
- `user_id` (Number)
29 changes: 29 additions & 0 deletions docs/data-sources/global_resource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tines_global_resource Data Source - terraform-provider-tines"
subcategory: ""
description: |-
---

# tines_global_resource (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `folder_id` (Number)
- `name` (String)
- `read_access` (String)
- `team_id` (Number)
- `value` (String)

### Read-Only

- `global_resource_id` (Number)
- `id` (String) The ID of this resource.
36 changes: 36 additions & 0 deletions docs/data-sources/story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tines_story Data Source - terraform-provider-tines"
subcategory: ""
description: |-
---

# tines_story (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `description` (String)
- `disabled` (Boolean)
- `entry_agent_id` (Number)
- `folder_id` (String)
- `keep_events_for` (Number)
- `name` (String)
- `priority` (Boolean)
- `story_to_story` (Boolean)
- `team_id` (Number)
- `user_id` (Number)

### Read-Only

- `created_at` (String)
- `guid` (String)
- `id` (Number) The ID of this resource.
- `updated_at` (String)
22 changes: 22 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tines Provider"
subcategory: ""
description: |-
---

# tines Provider





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `base_url` (String) The Tines Base URL
- `email` (String) The Tines user email
- `token` (String) The API token used to connect to Tines.
39 changes: 39 additions & 0 deletions docs/resources/agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tines_agent Resource - terraform-provider-tines"
subcategory: ""
description: |-
---

# tines_agent (Resource)





<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `agent_options` (String)
- `agent_type` (String)
- `cron` (String)
- `disabled` (Boolean)
- `keep_events_for` (Number)
- `monitor_all_events` (Boolean)
- `monitor_failures` (Boolean)
- `name` (String)
- `position` (Map of String)
- `receiver_ids` (List of Number)
- `source_ids` (List of Number)
- `story_id` (Number)
- `timezone` (String)

### Read-Only

- `agent_id` (Number)
- `guid` (String)
- `id` (String) The ID of this resource.
- `user_id` (Number)
36 changes: 36 additions & 0 deletions docs/resources/agent_base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tines_agent_base Resource - terraform-provider-tines"
subcategory: ""
description: |-
---

# tines_agent_base (Resource)





<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `agent_options` (String)
- `agent_type` (String)
- `cron` (String)
- `disabled` (Boolean)
- `keep_events_for` (Number)
- `name` (String)
- `receiver_ids` (List of Number)
- `source_ids` (List of Number)
- `story_id` (Number)
- `timezone` (String)

### Read-Only

- `agent_id` (Number)
- `guid` (String)
- `id` (String) The ID of this resource.
- `user_id` (Number)
39 changes: 39 additions & 0 deletions docs/resources/agent_modify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "tines_agent_modify Resource - terraform-provider-tines"
subcategory: ""
description: |-
---

# tines_agent_modify (Resource)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `agent_id` (Number)

### Optional

- `agent_options` (String)
- `agent_type` (String)
- `cron` (String)
- `disabled` (Boolean)
- `keep_events_for` (Number)
- `name` (String)
- `receiver_ids` (List of Number)
- `source_ids` (List of Number)
- `story_id` (Number)
- `timezone` (String)

### Read-Only

- `guid` (String)
- `id` (String) The ID of this resource.
- `user_id` (Number)
Loading

0 comments on commit e6ebd38

Please sign in to comment.