Commit Graph
18666 Commits
Author SHA1 Message Date
Devashish 9eae8df58f Merge branch 'poc/provisioner-hcp-sbom' into poc/with-api-imported 2024-10-21 17:32:06 -04:00
Devashish 9df2e934db Lint 2024-10-21 17:03:44 -04:00
Devashish 8807cea7f3 Use single buffer 2024-10-21 16:54:02 -04:00
Devashish b2329ca1a9 Typed error check in validation 2024-10-21 16:30:48 -04:00
Devashish c39d3906fb Rename hcp_sbom to hcp-sbom 2024-10-15 14:56:43 -04:00
Devashish f2161a6c9c Optimize code 2024-10-14 17:18:05 -04:00
Devashish 00b8730e17 Fix linting 2024-10-09 10:29:46 -04:00
Devashish 17ee3e9b7f Add support for SPDX 2024-10-09 10:25:30 -04:00
Devashish b0589f53e0 DRY download SBOM functions 2024-10-08 21:56:50 -04:00
Devashish 647056a775 Run generate 2024-10-04 14:01:57 -04:00
Devashish 498fd1dfab Remove unnecessary test 2024-09-30 15:00:11 -04:00
Devashish 355112b7a8 Add PR suggestions 2024-09-30 14:51:08 -04:00
Jenna Goldstrich 31fb3f253c wip 2024-09-27 13:51:13 -07:00
Devashish 0272dc3705 Fix tests 2024-09-25 17:23:21 -04:00
Devashish 31af25881e Fix lint 2024-09-25 17:00:42 -04:00
Devashish f9c29cebdd Modify external provisioner 2024-09-25 14:04:24 -04:00
Devashish 62eaca54f8 Add and set up internal SBOM provisioner 2024-09-25 14:04:03 -04:00
Devashish e534589220 Add outer provisioner to download, validate and compress SBOM 2024-09-18 14:25:16 -04:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] 703e0de15c Result of tsccr-helper -log-level=info gha update . (#13156)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-09-05 14:28:55 -04:00
Wenfeng Pan 1b160e5df0 Add base64gzip function support to Packer template 2024-08-13 14:53:29 -04:00
Lucas Bajolet ded0500109 packer_test: add plugins used gadget
When testing a packer build or validate, one common use case is to check
which plugins are loaded and used by Packer to run a command.

This is generally done through Grep, but repeating the same pattern can
be redundant, and if the output changes, all those need to be updated.

Therefore, this commit introduces a PluginsUsed gadget, which can be
orchestrated to ensure a plugin is used, or not used, allowing to check
for multiple plugins at once.
2024-08-13 14:52:43 -04:00
Lucas Bajolet 6b158c5c24 packer_test: move some plugin functions to fs.go
As a small reorganisation attempt, this commit moves some file-system
oriented functions from plugin.go into its own file so they are more
logically grouped.
2024-08-13 14:52:43 -04:00
Lucas Bajolet 96b4ae4767 packer_test: move BuildSimplePlugin to plugin.go
In terms of organisation, we keep functions that interact with plugins
into its own file, therefore the function that build plugin versions
should really be in plugin.go, not in suite.go.
2024-08-13 14:52:43 -04:00
Lucas Bajolet 2fe11fb967 packer_test: move compiledPlugins to attribute
The compiledPlugins map used to be a global variable, which can be
problematic as we move to independent test suites, since those test
suites run in the same process space, the global variable could point to
now deleted plugin versions/paths in separate suites, which would make
tests fail with random errors.

To avoid this, the map is now scoped to the test suite, and a new copy
is created lazily if used by the test suite.
2024-08-13 14:52:43 -04:00
Lucas Bajolet 9e4452329f packer_test: make packer test suite modular
Having only one test suite for the whole of Packer makes it harder to
segregate between test types, and makes for a longer runtime as no tests
run in parallel by default.

This commit splits the packer_test suite into several components in
order to make extension easier.

First we have `lib`: this package embeds the core for running Packer
test suites. This ships facilities to build your own test suite for
Packer core, and exposes convenience methods and structures for building
plugins, packer core, and use it to run a test suite in a temporary
directory.

Then we have two separate test suites: one for plugins, and one for core
itself, the latter of which does not depend on plugins being compiled at
all.

This sets the stage for more specialised test suites in the future, each
of which can run in parallel on different parts of the code.
2024-08-13 14:52:43 -04:00
Wilken Rivera 2a206ccd68 Enable github workflows on feature branches 2024-08-12 16:07:28 -04:00
Lucas Bajolet 199a751353 docs: remove trailing whitespaces from the docs 2024-08-08 10:14:20 -04:00
Lucas Bajolet 6514a66131 docs: update manually installing plugins docs
The installing plugins docs had information on manually installing
plugins that was misleading a bit, so we update that section with this
commit.
2024-08-08 10:14:20 -04:00
dependabot[bot] a1caaad47d build(deps): bump github.com/hashicorp/hcp-sdk-go from 0.99.0 to 0.105.0 (#13129)
Bumps [github.com/hashicorp/hcp-sdk-go](https://github.com/hashicorp/hcp-sdk-go) from 0.99.0 to 0.105.0.
- [Release notes](https://github.com/hashicorp/hcp-sdk-go/releases)
- [Changelog](https://github.com/hashicorp/hcp-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/hcp-sdk-go/compare/v0.99.0...v0.105.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/hcp-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 14:04:28 -04:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] eb77d54973 Result of tsccr-helper -log-level=info gha update . (#13131)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-08-05 14:03:40 -04:00