Commit Graph

143 Commits

Author SHA1 Message Date
Christian Mesh
cf30f69148
Update lint make target to match CI (#2025)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-10-02 08:26:27 -04:00
Ioannis Polyzos
4b0a3966cd
Add the test-with-coverage makefile target. (#2017)
Signed-off-by: Ioannis Polyzos <git@ipolyzos.com>
Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
Co-authored-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
2024-09-27 08:07:23 -04:00
Ioannis Polyzos
34a0e515b9
Add a test target in Makefile to run tests across all packages (#2016)
Signed-off-by: Ioannis Polyzos <git@ipolyzos.com>
2024-09-26 09:14:22 -04:00
Ioannis Polyzos
beab8cfaba
Add the .POSIX line to Makefile (#1928)
Signed-off-by: Ioannis Polyzos <git@ipolyzos.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
2024-09-18 10:54:39 -04:00
Ioannis Polyzos
2e4f76452b
Makefile help target (#1925)
Signed-off-by: Ioannis Polyzos <git@ipolyzos.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
2024-08-28 12:47:43 -04:00
Ioannis Polyzos
a00b81d6a9
Make build target (#1927)
Signed-off-by: Ioannis Polyzos <git@ipolyzos.com>
2024-08-28 12:29:56 -04:00
Janos
dd5f9afe89
Coding standards (#1423)
Signed-off-by: Janos <86970079+janosdebugs@users.noreply.github.com>
Signed-off-by: ollevche <ollevche@gmail.com>
Co-authored-by: James Humphries <james@james-humphries.co.uk>
Co-authored-by: Oleksandr Levchenkov <ollevche@gmail.com>
2024-05-13 11:39:46 +02:00
Isaac Parker
5c1ecde90a
chore: add linux install instructions test to makefile (#976)
Signed-off-by: Isaac Parker <parrotmac@gmail.com>
2023-12-06 07:22:08 -05:00
Kuba Martin
0eaa6fdb80
Add gcs end-to-end tests to the makefile. (#955)
Signed-off-by: Jakub Martin <kubam@spacelift.io>
2023-12-01 15:14:10 +01:00
Dmitry Kisler
272e9441de
Add dependencies for integration tests with Kubernetes as backend (#933) 2023-11-28 15:48:50 +01:00
Dmitry Kisler
7faa8a81f8
Add dependencies for integration tests with Consul as backend (#932)
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
2023-11-28 12:37:23 +01:00
Kuba Martin
5c8ed783bd
Add Azure integration test runbook. (#924)
One test is removed.
It doesn't seem to be a recommended mode of authentication and I have found no guide on how to configure it.
I've decided to skip this test in the suite, rather than spending more time to make it work.

Signed-off-by: Jakub Martin <kubam@spacelift.io>
2023-11-24 17:20:26 +01:00
Dmitry Kisler
398a2cf4f8
Add definition of integration tests with Postgres backend (#920)
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
2023-11-24 14:48:03 +01:00
Serdar Dalgıç
cb7713bc54
Enhance the documentation to show how to run the docs website locally (#638)
Signed-off-by: Serdar Dalgıç <sd@serdardalgic.org>
2023-10-04 10:58:55 +02:00
Elbaz
e5878055b6
Rename to opentofu docs and root folder (#529) 2023-09-21 12:53:02 +03:00
Patrick Decat
f9e4bd0211
fix(ci): allow disabling licensei checks by env var and cache dependencies license information to avoid GitHub API rate limiting (#412) 2023-09-18 15:25:42 +03:00
Patrick Decat
787b1db878
feat: add license checks on dependencies (#310)
Co-authored-by: Roni Frantchi <roni-frantchi@users.noreply.github.com>
2023-09-13 19:10:41 +03:00
Yaron Yarimi
da56f706e7 Renaming of Terraform to OpenTF 2023-08-22 15:45:05 +03:00
HashiBot
54de574e2b
chore: Update Digital Team Files (#32037)
* Update generated scripts (website-start.sh)

* Update generated website Makefile

* Update generated scripts (should-build.sh)

* Update generated scripts (website-build.sh)

* chore: update root `Makefile`

Co-authored-by: Kevin Wang <kwangsan@gmail.com>
2022-10-20 14:04:57 -04:00
Martin Atkins
4c7f20853f build: Run scripts directly from makefile, rather than via sh
All four of these scripts have #! lines calling for them to run in bash,
and they are all marked as executable, so there's no harm in running them
directly and it makes it clearer that we're running them in the shell
specified on the #! line, rather than with whatever "sh' happens to be
on the current system.

(Note that this _was_ still correctly using the #! lines before, because
it's `sh -c` rather than just `sh`, but nonetheless that old way seemed
needlessly confusing.)
2022-08-26 09:47:30 -07:00
Martin Atkins
edb1152ae0 build: Enable command echo for various Makefile targets
When we run many of these together e.g. in the checks.yaml GitHub Actions
workflow, it's hard to tell from the output exactly which command is
producing which subset of the output.

To help clarify that, we'll ask make to print out the command line it's
running before it runs it.
2022-08-26 09:47:30 -07:00
Liam Cervante
afd273d636
Add goimports as a check to the Github commit actions (#31432)
* Add goimports as a check to the Github commit actions

* check diff against main instead of last commit

* goimports should fix the problems

* fix up conditionals and wildcard matching

* specify origin/main in diff

* fetch main branch when checkout

* back to origin main
2022-07-19 10:14:28 +01:00
Kevin Wang
2563bf3f96
feat: support local preview, post split; add deploy preview (#30814)
* chore: support local preview, post split

* feat: deploy preview

* update script perms
- chmod +x ./website/scripts/website-build.sh

* npm i

* chore: website-build uses 'kevin/terraform-split'

* deploy preview test

* chore: test

* PREVIEW_DIR & CLONE_DIR = preview

* rm dupe preview path

* empty commit

* ../data & ..docs

* website-preview

* remove REPO var

* move `intro` and `guides` back to where they were

* empty commit

* chore move `intro` and `guides`

* chore: copy over images

* move images into `/website`
- content API requires this

* chore: `CURRENT_GIT_BRANCH`

* fix: `CURRENT_GIT_BRANCH`

* fix `CURRENT_GIT_BRANCH`

* debug current dir

* fix `CURRENT_GIT_BRANCH`

* chore: comment CURRENT_GIT_BRANCH

* Update Makefile

* Update website/scripts/website-build.sh

* optimize images

* chore(Makefile): move vars to top

* remove branch
2022-04-21 13:58:16 -04:00
Dylan Staley
a086f0c1a5 update make website workflow 2021-12-16 16:10:17 -08: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
a3fb07d008 add staticcheck make target
cleanup the old fmtcheck script while we're in here
2021-09-01 11:36:21 -04:00
Martin Atkins
ce96d82de0 build: Centralize our protobuf compilation steps
We have a few different .proto files in this repository that all need to
get recompiled into .pb.go files each time we change them, but we were
previously handling that with some scripts that just assumed that protoc
and the relevant plugins were already installed on the system somewhere,
at the right versions.

In practice we've been constantly flopping between different versions of
these tools due to folks having different versions installed in their
development environments. In particular, the state of the .pb.go files
in the prior commit wasn't reproducible by any single version of the tools
because they've all slightly diverged from one another.

In the interests of being more consistent here and avoiding accidental
inconsistencies, we'll now centralize the protocol buffer compile steps
all into a single tool that knows how to fetch and install the expected
versions of the various tools we need and then run those tools with the
right options to get a stable result.

If we want to upgrade to either a newer protoc or a newer protoc-gen-go
in future then we'll do that in a central location and update all of the
.pb.go files at the same time, so that we're always consistently tracking
the same version of protocol buffers everywhere.

While doing this I attempted to keep as close as possible to the toolchain
we'd most recently used, but since they were not consistent with each
other they've now all changed which version numbers they record at minimum,
and the planproto stub in particular now also has a slightly different
descriptor serialization but is otherwise offering the same API.
2021-08-20 16:18:48 -07: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
Nick Fagerlund
bf5522aaec Remove website-test task from Makefile
This task relied on using `wget` to spider the entire site, which is no longer a
useful way of checking for broken links on a non-production instance of
terraform.io. Also, it didn't include a step for pausing until the server came
online, so the task wouldn't have functioned properly anyway.
2021-01-13 17:35:54 -08:00
James Bardin
85b7027048 File no longer exists to be formatted
Were no longer generating the internal plugins list which needs to be
formatted.
2020-12-02 12:45:00 -05:00
James Bardin
8bfbafa790 remove vendor from some tooling 2020-09-23 17:06:59 -04:00
Pam Selle
0eac3de22a Fix missing VERSION for running make website 2020-08-12 13:24:03 -04:00
Alisdair McDiarmid
ba374baef0 Makefile: remove unused targets
Most of the targets in the Makefile have not been used in either CI or
the normal development workflow for some time. Removing them clarifies
that the expected way to build Terraform locally is simple: go install.

Remaining targets:

- fmtcheck, generate: these are used in CI to verify that the code is
  correctly formatted and that generate has been run appropriately
- protobuf: referenced in CONTRIBUTING.md as the simplest way to build
  the proto files
- website, website-test: used to compile and test the local website in
  isolation from the terraform-website repo
2020-06-08 07:02:54 -04:00
Pam Selle
9ae266f8fe Coverage updates, roll back makefile change, use travis specific script 2020-03-03 14:10:17 -05:00
Pam Selle
6a4cfa18da Coverage 2020-03-03 13:01:05 -05:00
Kristin Laemmert
c72d2c6c44 build: add terraform-bundle e2etests 2019-12-12 09:26:26 -05:00
Radek Simko
7860f55e4f
Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
Peter Dave Hello
0c63c7c854 build/Makefile: Properly exclude files under "./vendor/" path for go fmt (#19097)
Properly exclude files under "./vendor/" path, and find "files" only.
The original method "might" found "directories" with the same naming,
or, might exclude occasionally exclude the go files with "vendor" string
in any part of its path.
2019-09-06 08:58:34 -04:00
Radek Simko
01bc8898fc
make: Add check for protobuf dependencies 2019-09-05 14:30:54 +02:00
Martin Atkins
a9274beaca build: Run "go generate" in modules mode
It seems that all of the tools we run here are now sufficiently
modules-aware to run without problems in modules mode, and indeed running
_not_ in modules mode was causing problems with locating packages in
mockgen.
2019-02-06 11:19:44 -08:00
Radek Simko
357dcc924f
make: Make test-compile module-aware 2019-02-01 13:18:51 +00:00
Radek Simko
5691c8b337
make: Pull all generate dependencies before generating 2019-01-29 23:07:01 +00:00
James Bardin
a24e307af0 remove govendor 2018-12-10 17:16:42 -05:00
Martin Atkins
4fe9632f09 plugin: Establish our current plugin protocol as version 5
The main significant change here is that the package name for the proto
definition is "tfplugin5", which is important because this name is part
of the wire protocol for references to types defined in our package.

Along with that, we also move the generated package into "internal" to
make it explicit that importing the generated Go package from elsewhere is
not the right approach for externally-implemented SDKs, which should
instead vendor the proto definition they are using and generate their
own stubs to ensure that the wire protocol is the only hard dependency
between Terraform Core and plugins.

After this is merged, any provider binaries built against our
helper/schema package will need to be rebuilt so that they use the new
"tfplugin5" package name instead of "proto".

In a future commit we will include more elaborate and organized
documentation on how an external codebase might make use of our RPC
interface definition to implement an SDK, but the primary concern here
is to ensure we have the right wire package name before release.
2018-11-19 09:56:41 -08:00
Martin Atkins
c133de863b build: Update most things for Go 1.11 modules
We're still using vendoring for now until we get _all_ of our tooling
updated, so the main idea here is to force use of the vendor directory
when running tests and building for development so we can quickly find
situations where we forget to run "go mod vendor".

We also setting GO111MODULE=off for installation of tools. Right now this
is the best way to install a tool in GOBIN without also interfering with
go.mod and go.sum, until a better pattern for managing tool dependencies
is devised by the Go team.

Finally, we run "go mod download" before launching "gox" in the main
build process, to prime the local module cache once so that the concurrent
"go build" processes won't race to populate it redundantly. This means
that we'll be producing final builds from the module cache rather than
from vendor as with everything else -- there's currently no way to tell
gox to use -mod=vendor -- but that should be fine in practice since
our go.sum file will ensure that we get the exact sources we expect in
the module cache before building.
2018-11-19 09:02:35 -08:00
Martin Atkins
ec57927ea3 build: Take protoc out of the "go generate" path
Since protoc is not go-gettable, and most development tasks in Terraform
won't involve recompiling protoc files anyway, we'll use a separate
mechanism for these.

This way "go generate" only depends on things we can "go get" in the
"make tools" target.

In a later commit we should also in some way specify a particular version
of protoc to use so that we don't get "flapping" regenerations as
developers work with different versions, but the priority here is just to
make "make generate" minimally usable again to restore the dev workflow
documented in the README.

This also includes some updates that resulted from running "make generate"
and "make protobuf" after those Makefile changes were in place.
2018-10-18 10:39:20 -07:00
Sander van Harmelen
fb0af07696 Print status updates while waiting for the run to start 2018-10-11 13:41:48 +02:00
Radek Simko
c4ffdb1f57
make: Add website + website-test targets 2018-05-02 12:44:17 +01:00
James Bardin
ec62819b3a finish removing vet from the makefile
The test target will already cover vet, since it's run as part of the
test command now.

Also remove the `go test -i` since it's no longer needed with the new
build cache.
2018-02-21 15:30:29 -05:00
James Bardin
3bc1dcf21a update travis to build with go1.10
Remove the vet target too, since vet is now always run with every test.
2018-02-21 11:27:46 -05:00