Skip to content

Commit 50248a5

Browse files
committed
Pre Release prep work
1 parent 46681c0 commit 50248a5

17 files changed

+815
-198
lines changed

.github/workflow/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Terraform Provider release workflow.
2+
name: Release
3+
4+
# This GitHub action creates a release when a tag that matches the pattern
5+
# "v*" (e.g. v0.1.0) is created.
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
# Releases need permissions to read and write the repository contents.
12+
# GitHub considers creating releases and uploading assets as writing contents.
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
goreleaser:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
21+
with:
22+
# Allow goreleaser to access older tag information.
23+
fetch-depth: 0
24+
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
25+
with:
26+
go-version-file: 'go.mod'
27+
cache: true
28+
- name: Import GPG key
29+
uses: crazy-max/ghaction-import-gpg@cb9bde2e2525e640591a934b1fd28eef1dcaf5e5 # v6.2.0
30+
id: import_gpg
31+
with:
32+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
33+
passphrase: ${{ secrets.PASSPHRASE }}
34+
- name: Run GoReleaser
35+
uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6.2.1
36+
with:
37+
args: release --clean
38+
env:
39+
# GitHub sets the GITHUB_TOKEN secret automatically.
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ examples/terraform_config/*.log
55
*.log
66
*.tfstate
77
testing/logs
8+
dist/
9+
810

.goreleaser.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Visit https://goreleaser.com for documentation on how to customize this
2+
# behavior.
3+
before:
4+
hooks:
5+
# this is just an example and not a requirement for provider building/publishing
6+
- go mod tidy
7+
builds:
8+
- env:
9+
# goreleaser does not work with CGO, it could also complicate
10+
# usage by users in CI/CD systems like Terraform Cloud where
11+
# they are unable to install libraries.
12+
- CGO_ENABLED=0
13+
mod_timestamp: '{{ .CommitTimestamp }}'
14+
flags:
15+
- -trimpath
16+
ldflags:
17+
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
18+
goos:
19+
- freebsd
20+
- windows
21+
- linux
22+
- darwin
23+
goarch:
24+
- amd64
25+
- '386'
26+
- arm
27+
- arm64
28+
ignore:
29+
- goos: darwin
30+
goarch: '386'
31+
binary: '{{ .ProjectName }}_v{{ .Version }}'
32+
archives:
33+
-
34+
formats: [ 'zip' ]
35+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
36+
checksum:
37+
extra_files:
38+
- glob: 'terraform-registry-manifest.json'
39+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
40+
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
41+
algorithm: sha256
42+
signs:
43+
- artifacts: checksum
44+
args:
45+
# if you are using this in a GitHub action or some other automated pipeline, you
46+
# need to pass the batch flag to indicate its not interactive.
47+
- "--batch"
48+
- "--local-user"
49+
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
50+
- "--output"
51+
- "${signature}"
52+
- "--detach-sign"
53+
- "${artifact}"
54+
release:
55+
extra_files:
56+
- glob: 'terraform-registry-manifest.json'
57+
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
58+
# If you want to manually examine the release before its live, uncomment this line:
59+
# draft: true

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## 0.1.0
2+
3+
_Pre Release_
4+
### Added
5+
- Fabric resources and data source
6+
- `ndfc_fabric_vxlan_evpn`
7+
- `ndfc_fabric_vxlan_msd`
8+
- `ndfc_fabric_lan_classic`
9+
- `ndfc_fabric_msite_ext_net`
10+
- `ndfc_fabric_ipfm`
11+
- Inventory Management `ndfc_inventory_devices` resource and data source
12+
- VPC Pair `ndfc_vpc_pair` resource
13+
- Interface resources and data source
14+
- `ndfc_interface_ethernet`
15+
- `ndfc_interface_portchannel`
16+
- `ndfc_interface_loopback`
17+
- `ndfc_interface_vlan`
18+
- `ndfc_interface_vpc`
19+
- Policy resource `ndfc_policy`
20+
- Template resource `ndfc_template`
21+
- VRF management `ndfc_vrfs`
22+
- Network management `ndfc_networks`
23+
24+
25+
26+

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by sending an email to devnet-github-owners@cisco.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# How to Contribute
2+
3+
Thanks for your interest in contributing to this Terraform provider! Here are a few general guidelines on contributing and
4+
reporting bugs that we ask you to review. Following these guidelines helps to communicate that you respect the time of
5+
the contributors managing and developing this open source project. In return, they should reciprocate that respect in
6+
addressing your issue, assessing changes, and helping you finalize your pull requests. In that spirit of mutual respect,
7+
we endeavor to review incoming issues and pull requests within 10 days, and will close any lingering issues or pull
8+
requests after 60 days of inactivity.
9+
10+
Please note that all of your interactions in the project are subject to our [Code of Conduct](/CODE_OF_CONDUCT.md). This
11+
includes creation of issues or pull requests, commenting on issues or pull requests, and extends to all interactions in
12+
any real-time space e.g., Slack, Discord, etc.
13+
14+
## Table Of Contents
15+
16+
- [Reporting Issues](#reporting-issues)
17+
- [Development](#development)
18+
- [Building the Provider](#building-the-provider)
19+
- [Acceptance Tests](#acceptance-tests)
20+
- [Sending Pull Requests](#sending-pull-requests)
21+
- [Other Ways to Contribute](#other-ways-to-contribute)
22+
23+
## Reporting Issues
24+
25+
Before reporting a new issue, please ensure that the issue was not already reported or fixed by searching through our
26+
[issues list](https://github.com/netascode/terraform-provider-ndfc/issues).
27+
28+
When creating a new issue, please be sure to include a **title and clear description**, as much relevant information as
29+
possible, and, if possible, a test case.
30+
31+
**If you discover a security bug, please do not report it through GitHub. Instead, please see security procedures in
32+
[SECURITY.md](/SECURITY.md).**
33+
34+
## Development
35+
36+
### Building the Provider
37+
38+
1. Clone the repository
39+
2. Enter the repository directory
40+
3. Build the provider using the Go `install` command:
41+
42+
```shell
43+
go install
44+
```
45+
46+
### Acceptance Tests
47+
48+
In order to run the full suite of Acceptance tests, run `run_accept_tests.sh`. Make sure that the test configuration is updated with the NDFC details
49+
50+
Note: Acceptance tests needs a real NDFC instance and it creates real resources
51+
52+
```shell
53+
run_accept_tests.sh
54+
```
55+
56+
## Sending Pull Requests
57+
58+
At this time we are not accepting Pull Requests from outside for new resources and data sources as we are in initial stages of development.
59+
We will selectively accept PRs related to adding new tests, minor bug fixes, documentation etc
60+
61+
## Other Ways to Contribute
62+
63+
We welcome anyone that wants to contribute to this Terraform provider to triage and reply to open issues to help troubleshoot
64+
and fix existing bugs. Here is what you can do:
65+
66+
- Help ensure that existing issues follows the recommendations from the _[Reporting Issues](#reporting-issues)_ section,
67+
providing feedback to the issue's author on what might be missing.
68+
- Review existing pull requests, and testing patches against real infrastructure.
69+
- Write a test, or add a missing test case to an existing test.
70+
71+
Thanks again for your interest on contributing to this Terraform provider!
72+
73+
:heart:

0 commit comments

Comments
 (0)