150 Commits

Author SHA1 Message Date
Diógenes Fernandes
530e5c4538 Fix linting on Windows (#3457)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
Signed-off-by: Diógenes Fernandes <diofeher@gmail.com>
Co-authored-by: Martin Atkins <mart@degeneration.co.uk>
2025-12-02 07:11:14 -03:00
Larry Bordowitz
a961f737b7 makefile: add .exe when building for Windows (#3452)
Signed-off-by: Larry Bo <laurence.bordowitz@gmail.com>
2025-11-05 12:36:22 -06:00
Martin Atkins
cdb2c1a213 .github: Use golangci-lint v2.6.0 in our PR checks
This is just a routine upgrade, keeping us up-to-date with the latest
linter changes. This already passes when run on Linux.

We know that currently the lint checks aren't passing on Windows even with
v2.4.0, and this doesn't do anything about that but it does mean that once
we make the linters pass on Windows we'll be dealing with the full set
supported in v2.6.0, rather than potentially having to do this across
two commits.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-11-01 08:00:01 -03:00
Larry Bordowitz
28493bc63f Update Makefile lint version to match GitHub Actions (#3211)
Signed-off-by: Larry Bordowitz <laurence.bordowitz@gmail.com>
2025-08-29 15:38:32 -04:00
Larry Bordowitz
782b817ff9 refactor: lint without revision flag (#2931)
Signed-off-by: Larry Bordowitz <laurence.bordowitz@gmail.com>
2025-06-17 22:07:14 +04:00
Tyler Auerbeck
59fcdcd2b8 Update makefile, github workflow to use golangci-lint v2
Signed-off-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>
2025-05-09 14:14:53 -04:00
Martin Atkins
2b4e7b7def GitHub Actions: Use latest golangci-lint and its GitHub Action
The version we were previously using does not support Go v1.24.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2025-02-26 11:33:43 -08:00
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