Skip to content

Commit

Permalink
Merge branch 'main' into comparisons
Browse files Browse the repository at this point in the history
Signed-off-by: Marques Johansson <[email protected]>
  • Loading branch information
displague authored Jul 11, 2024
2 parents d54cb4c + f931221 commit 7862697
Show file tree
Hide file tree
Showing 433 changed files with 18,109 additions and 12,032 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# 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 (paultyng/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
name: Generate Next Release
on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -42,8 +28,19 @@ jobs:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Release
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19.0.5
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,28 @@ on:
branches:
- main


jobs:

validate_docs:
name: Validate docs
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
id: go

- name: Get dependencies
run: go mod download

- name: Check that all docs changes are committed
run: |
make docs-check
test:
name: Test
runs-on: ubuntu-latest
Expand Down
9 changes: 5 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
version: 2

before:
hooks:
# this is just an example and not a requirement for provider building/publishing
Expand Down Expand Up @@ -66,7 +68,7 @@ archives:
- LICENSE*
- README*
- CHANGELOG*
- src: 'cmd/migration-tool/*.md'
- src: "cmd/migration-tool/*.md"
dst: equinix-migration-tool
strip_parent: true
checksum:
Expand All @@ -85,7 +87,6 @@ signs:
- "--detach-sign"
- "${artifact}"
release:
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
mode: "keep-existing"
changelog:
skip: true
disable: true
37 changes: 37 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"branches": [
"main"
],
"ci": false,
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/github",
{
"successComment": "This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:",
"labels": false,
"releasedLabels": false
}
],
[
"@semantic-release/git",
{
"message": "ci: regenerate code for version ${nextRelease.version}",
"assets": [
"."
]
}
]
]
}
5 changes: 3 additions & 2 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
#
* @equinix/governor-devrel-engineering
/cmd/migration-tool @equinix/governor-metal-client-interfaces
*metal* @t0mk @equinix/governor-metal-client-interfaces
*metal* @equinix/governor-metal-client-interfaces
docs/guides/network_types.md @equinix/governor-metal-client-interfaces
*fabric* @equinix/governor-digin-fabric
*ecx* @equinix/governor-digin-fabric
*connection_e2e* @equinix/governor-digin-fabric
*resource_network_* @equinix/governor-ne-network-edge-engineering
docs/**/network_* @equinix/governor-ne-network-edge-engineering
*data_source_network_* @equinix/governor-ne-network-edge-engineering
**/edge-networking @equinix/governor-ne-network-edge-engineering
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Available via [https://github.com/equinix/terraform-provider-equinix/blob/main/.

Please submit change requests and / or features via [Issues](https://github.com/equinix/terraform-provider-equinix/issues). There's no guarantee it'll be changed, but you never know until you try. We'll try to add comments as soon as possible, though.

All resource and data source changes must be reflected in the documentation, including new attributes and changes to existing attributes. The documentation is generated via `make docs`. For more detailed instructions for updating docs, see ["Documenting the provider" in the development guide](./DEVELOPMENT.md#documenting-the-provider).

## How to Report a Bug

Bugs are problems in code, in the functionality of an application or in its UI design; you can submit them through [Issues/(https://github.com/equinix/terraform-provider-equinix/issues) as well.
Bugs are problems in code, in the functionality of an application or in its UI design; you can submit them through [Issues](https://github.com/equinix/terraform-provider-equinix/issues) as well.
13 changes: 13 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
* [Go](https://golang.org/doc/install) 1.18 (to build the provider plugin)
* [GNU Make](https://www.gnu.org/software/make) (to build and test easier)

## Documenting the provider

This project uses HashiCorp's [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) tool to generate docs. In particular, keep the [terraform-plugin-docs conventional paths](https://github.com/hashicorp/terraform-plugin-docs?tab=readme-ov-file#conventional-paths) in mind when adding or updating docs for a resource or data source. The conventional paths will tell you where to put examples if you are using the default templates.

Templates for documentation are stored in the `templates` directory. The following default templates exist; try using them first and only add a resource- or data-source-specific template when needed:

- Resource default template: templates/resources.md.tmpl
- Datasource default template: templates/data-sources.md.tmpl

The documentation can be generated from the `templates` and `examples` directories using the `make docs` task. The `make check-docs` task is run in CI for every PR to ensure that all necessary docs changes have been committed and pushed to GitHub.

**NOTE**: `terraform-plugin-docs` is focused on provider, resource, and datasource documentation. Guides must be created in the `templates` directory, but they cannot use templating functions; the `templates/guides` directory is copied to the `docs` directory as-is.

## Building the provider

*Note:* This project uses [Go Modules](https://blog.golang.org/using-go-modules)
Expand Down
11 changes: 11 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ test-compile:
fi
go test -c $(TEST) $(TESTARGS)

.PHONY: docs docs-check

docs:
go generate ./...

docs-check: docs
if git status --porcelain | grep docs; then \
echo "Uncommitted changes detected. Run 'make docs' and commit changes."; \
exit 1; \
fi

docs-lint:
@echo "==> Checking docs against linters..."
@misspell -error -source=text docs/ || (echo; \
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ management of Equinix Platform resources.

---

This repository is [Maintained](https://github.com/equinix-labs/equinix-labs/blob/main/maintained-statement.md) meaning that this software is supported by Equinix Metal and its community - available to use in production environments.

## Requirements

- [Terraform](https://www.terraform.io/downloads.html) 0.12+
Expand Down
22 changes: 22 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Release Instructions

These build and release instructions are intended for the maintainers and future maintainers of this project.

## Preparing a new version

There are no preparation steps.

* the version is computed from [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) tags
* There is no changelog; the GitHub release notes are generated based on [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) tags

## Releasing

Run the GitHub Actions [Release Workflow](.github/workflows/release.yml) on the `main` branch.

The release workflow:
- Uses [Semantic Release](.releaserc.json) to determine the next version number and create the GitHub release
- Uses [GoReleaser](.goreleaser.yml) to build the terraform provider plugins and attach them to the GitHub release

This will build and release plugins for several different OS and Architecture combinations.

Any special instructions or notes should be added by editing the release notes that the workflow publishes. These notes can be found at https://github.com/equinix/terraform-provider-equinix/releases
77 changes: 0 additions & 77 deletions docs/data-sources/equinix_ecx_l2_sellerprofile.md

This file was deleted.

41 changes: 0 additions & 41 deletions docs/data-sources/equinix_ecx_l2_sellerprofiles.md

This file was deleted.

46 changes: 0 additions & 46 deletions docs/data-sources/equinix_ecx_port.md

This file was deleted.

Loading

0 comments on commit 7862697

Please sign in to comment.