Commit Graph

32 Commits

Author SHA1 Message Date
James Bardin
05954a328d udpate CI go version
Since we have to specify the minor release for `.go-version`, make sure
the CI version doesn't automatically udpate.
2021-10-08 15:53:08 -04:00
Alisdair McDiarmid
e09bad76ff build: Add exhaustive switch statement lint
For now, only check the JSON views package, since this was the instance
that most recently tripped us up. There are a few dozen failures
elsewhere in Terraform which would need to be addressed before expanding
this to other packages.
2021-09-24 15:12:44 -04:00
James Bardin
34325d5b66 add staticcheck to circleci 2021-09-01 11:36:21 -04:00
Martin Atkins
960f736bc2 build: CI check to verify that the protobuf stubs are up-to-date 2021-08-20 16:18:48 -07:00
James Bardin
f029183f63
Merge pull request #29260 from hashicorp/jbardin/go-mod-tidy
run go mod tidy in CI
2021-08-18 13:55:24 -04:00
Martin Atkins
383bbdeebc Upgrade to Go 1.17
This includes the addition of the new "//go:build" comment form in addition
to the legacy "// +build" notation, as produced by gofmt to ensure
consistent behavior between Go versions. The new directives are all
equivalent to what was present before, so there's no change in behavior.

Go 1.17 continues to use the Unicode 13 tables as in Go 1.16, so this
upgrade does not require also upgrading our Unicode-related dependencies.

This upgrade includes the following breaking changes which will also
appear as breaking changes for Terraform users, but that are consistent
with the Terraform v1.0 compatibility promises.

- On MacOS, Terraform now requires macOS 10.13 High Sierra or later.

This upgrade also includes the following breaking changes which will
appear as breaking changes for Terraform users that are inconsistent with
our compatibility promises, but have justified exceptions as follows:

- cidrsubnet, cidrhost, and cidrnetmask will now reject IPv4 CIDR
  addresses whose decimal components have leading zeros, where previously
  they would just silently ignore those leading zeros.

  This is a security-motivated exception to our compatibility promises,
  because some external systems interpret zero-prefixed octets as octal
  numbers rather than decimal, and thus the previous lenient parsing could
  lead to a different interpretation of the address between systems, and
  thus potentially allow bypassing policy when configuring firewall rules
  etc.

This upgrade also includes the following breaking changes which could
_potentially_ appear as breaking changes for Terraform users, but that do
not in practice for the reasons given:

- The Go net/url package no longer allows query strings with pairs
  separated by semicolons instead of ampersands. This primarily affects
  HTTP servers written in Go, and Terraform includes a special temporary
  HTTP server as part of its implementation of OAuth for "terraform login",
  but that server only needs to accept URLs created by Terraform itself
  and Terraform does not generate any URLs that would be rejected.
2021-08-17 15:20:05 -07:00
James Bardin
86ba49de0c run go mod tidy in CI
Ensure that go.mod and go.sum are correct
2021-07-28 14:55:37 -04:00
Sam Salisbury
e17abccf2e ci: add darwin/arm64 to workflow 2021-06-30 12:45:53 +01:00
Sam Salisbury
2337334b1f ci: add darwin/arm64 build 2021-06-30 12:44:46 +01:00
Kristin Laemmert
5a48530f47
tools: remove terraform-bundle. (#28876)
* tools: remove terraform-bundle.

terraform-bundle is no longer supported in the main branch of terraform. Users can build terraform-bundle from terraform tagged v0.15 and older.

* add a README pointing users to the v0.15 branch
2021-06-03 14:08:04 -04:00
James Bardin
4922c743c8 update circleci to cimg to match release pipeline
This allows us to update the go version as well
2021-05-20 11:14:14 -04:00
Martin Atkins
d35bc05312 Update various non-code references to renamed Go packages
Previous commits have moved all of our Go packages under "internal", so
this is a retroactive update of non-Go references to those same packages.
2021-05-17 14:09:07 -07:00
James Bardin
43af00262e remove codedov 2021-04-29 13:12:58 -04:00
James Bardin
23e08cd064 remove unsupported platforms from tests
Rather than increase resources for more cross-platform builds, opt to
remove platforms that are not officially supported.
2021-03-30 11:10:03 -04:00
James Bardin
6ef5ed1060 provide more memory for builds
Cross-platform builds are running out of resources. Try using a little
more memory.
2021-03-30 10:36:16 -04:00
Kristin Laemmert
106bcd3bf0
update to match new default branch name (#27909) 2021-02-24 13:36:47 -05:00
Martin Atkins
e3abe9020d build: Terraform is now built with Go 1.16 2021-02-23 09:56:06 -08:00
Nick Fagerlund
96ec703a8c CI: Add broken link checking job for website content
This adds a CI job for running the new PR link checker for documentation.

[terraform-website PR 1574](https://github.com/hashicorp/terraform-website/pull/1574)
added a new link checking CI job specifically for warning about broken links in
pull requests. This link checker is optimized for:

- Running (relatively) quickly.
- Only reporting on files that were changed in the current PR, to avoid spamming
  you with problems you had nothing to do with.
- Being transparent and simple to maintain. (Note that this is in conflict with
  minimizing false positives/negatives! We try to give very few of both, but
  completely eliminating them would result in an unaffordable maintenance
  burden. We expect that some PRs will be merged with this job red.)

The tool is somewhat specific to our Middleman site builder, and we expect it
will be replaced or obviated in the transition to the Next.js platform... but in
the meantime, it should help make documentation slightly easier to maintain.
2021-01-13 15:09:41 -08:00
Alvin Huang
70a8be60b9 switch to hashicorp docker mirror 2020-10-29 22:37:11 -04:00
James Bardin
a7c5a72c3d
Merge pull request #26358 from hashicorp/jbardin/no-vendor
Remove vendoring
2020-09-24 10:57:02 -04:00
James Bardin
8bfbafa790 remove vendor from some tooling 2020-09-23 17:06:59 -04:00
James Bardin
bf5fc8b913 go1.15 in circleci 2020-09-23 16:54:37 -04:00
Alisdair McDiarmid
579e0b20e1 build: Enable Consul remote backend tests 2020-09-11 12:56:37 -04:00
Alvin Huang
9b41578d83 add test for 'full' docker image build 2020-06-17 10:48:10 -04:00
Alisdair McDiarmid
cd339a5a2b Only notify Slack on job failure 2020-04-22 11:26:44 -04:00
Alisdair McDiarmid
680a87c420 CircleCI Slack status is for jobs, not workflows 2020-04-22 11:21:32 -04:00
Alisdair McDiarmid
9aa0a2c266 Add CircleCI Slack build notifications 2020-04-22 11:11:12 -04:00
Kristin Laemmert
a43f141f9e
tools/terraform-bundle: refactor to use new provider installer and provider directory layouts (#24629)
* tools/terraform-bundle: refactor to use new provider installer and
provider directory layouts

terraform-bundle now supports a "source" attribute for providers,
uses the new provider installer, and the archive it creates preserves
the new (required) directory hierarchy for providers, under a "plugins"
directory.

This is a breaking change in many ways: source is required for any
non-HashiCorp provider, locally-installed providers must be given a
source (can be arbitrary, see docs) and placed in the expected directory
hierarchy, and the unzipped archive is no longer flat; there is a new
"plugins" directory created with providers in the new directory layout.

This PR also extends the existing test to check the contents of the zip
file.

TODO: Re-enable e2e tests (currently suppressed with a t.Skip)
This commit includes an update to our travis configuration, so the terraform-bundle e2e tests run. It also turns off the e2e tests, which will fail until we have a terraform 0.13.* release under releases.hashicorp.com. We decided it was better to merge this now instead of waiting when we started seeing issues opened from users who built terraform-bundle from 0.13 and found it didn't work with 0.12 - better that they get an immediate error message from the binary directing them to build from the appropriate release.
2020-04-21 17:09:29 -04:00
Alvin Huang
2d2369e3b1 add better error message when 'make fmtcheck generate' fails 2020-04-06 10:52:31 -04:00
Alvin Huang
d425f62009 name long bash test command 2020-03-31 17:38:35 -07:00
Alvin Huang
11650bd1b5 migrate travis to circle 2020-03-31 17:38:35 -07:00
Alvin Huang
fd6c0d650e add sample circleci config 2020-03-27 12:48:57 -04:00