Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HPR-1420] Remove bundled plugins from Packer core #12660

Merged
merged 4 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 0 additions & 184 deletions acctest/plugin/bundled_plugin_test.go

This file was deleted.

8 changes: 0 additions & 8 deletions acctest/plugin/component_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"os/exec"
"testing"

amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance"
"github.com/hashicorp/packer-plugin-sdk/acctest"
"github.com/hashicorp/packer/hcl2template/addrs"
)
Expand All @@ -32,13 +31,6 @@ func TestAccInitAndBuildBasicAmazonAmiDatasource(t *testing.T) {
Setup: func() error {
return cleanupPluginInstallation(plugin)
},
Teardown: func() error {
helper := amazonacc.AMIHelper{
lbajolet-hashicorp marked this conversation as resolved.
Show resolved Hide resolved
Region: "us-west-2",
Name: "packer-amazon-ami-test",
}
return helper.CleanUpAmi()
},
Template: basicAmazonAmiDatasourceHCL2Template,
Type: "amazon-ami",
Init: true,
Expand Down
8 changes: 0 additions & 8 deletions acctest/plugin/plugin_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"regexp"
"testing"

amazonacc "github.com/hashicorp/packer-plugin-amazon/builder/ebs/acceptance"
"github.com/hashicorp/packer-plugin-sdk/acctest"
"github.com/hashicorp/packer-plugin-sdk/acctest/testutils"
"github.com/hashicorp/packer/hcl2template/addrs"
Expand All @@ -36,13 +35,6 @@ func TestAccInitAndBuildBasicAmazonEbs(t *testing.T) {
Setup: func() error {
return cleanupPluginInstallation(plugin)
},
Teardown: func() error {
helper := amazonacc.AMIHelper{
Region: "us-east-1",
Name: "packer-plugin-amazon-ebs-test",
}
return helper.CleanUpAmi()
},
Template: basicAmazonEbsHCL2Template,
Type: "amazon-ebs",
Init: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
packer {
required_plugins {
amazon = {
version = ">= 0.0.1"
version = "~>1"
source = "github.com/hashicorp/amazon"
}
}
Expand All @@ -25,6 +25,7 @@ source "amazon-ebs" "basic-example" {
communicator = "ssh"
instance_type = "t2.micro"
ssh_username = "ubuntu"
skip_create_ami = true
}

build {
Expand Down
15 changes: 8 additions & 7 deletions acctest/plugin/test-fixtures/basic-amazon-ebs.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
packer {
required_plugins {
amazon = {
version = ">= 0.0.1"
source = "github.com/hashicorp/amazon"
version = "~> 1"
source = "github.com/hashicorp/amazon"
}
}
}

source "amazon-ebs" "basic-test" {
region = "us-east-1"
instance_type = "m3.medium"
source_ami = "ami-76b2a71e"
ssh_username = "ubuntu"
ami_name = "packer-plugin-amazon-ebs-test"
region = "us-east-1"
instance_type = "m3.medium"
source_ami = "ami-76b2a71e"
ssh_username = "ubuntu"
ami_name = "packer-plugin-amazon-ebs-test"
skip_create_ami = true
}

build {
Expand Down
10 changes: 0 additions & 10 deletions acctest/plugin/test-fixtures/basic_amazon_bundled.json

This file was deleted.

11 changes: 0 additions & 11 deletions acctest/plugin/test-fixtures/basic_amazon_bundled.pkr.hcl

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions command/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ func (c *BuildCommand) RunContext(buildCtx context.Context, cla *BuildArgs) int
}

diags = packerStarter.Initialize(packer.InitializeOptions{})
bundledDiags := c.DetectBundledPlugins(packerStarter)
diags = append(bundledDiags, diags...)
ret = writeDiags(c.Ui, nil, diags)
if ret != 0 {
return ret
Expand Down
7 changes: 2 additions & 5 deletions command/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"runtime"
"testing"

"github.com/hashicorp/packer-plugin-amazon/builder/ebs"
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
"github.com/hashicorp/packer/builder/file"
"github.com/hashicorp/packer/builder/null"
Expand Down Expand Up @@ -121,10 +120,8 @@ func getBareComponentFinder() packer.ComponentFinder {
return packer.ComponentFinder{
PluginConfig: &packer.PluginConfig{
Builders: packer.MapOfBuilder{
"file": func() (packersdk.Builder, error) { return &file.Builder{}, nil },
"null": func() (packersdk.Builder, error) { return &null.Builder{}, nil },
"amazon-ebs": func() (packersdk.Builder, error) { return &ebs.Builder{}, nil },
"azure-arm": func() (packersdk.Builder, error) { return &ebs.Builder{}, nil },
"file": func() (packersdk.Builder, error) { return &file.Builder{}, nil },
"null": func() (packersdk.Builder, error) { return &null.Builder{}, nil },
},
Provisioners: packer.MapOfProvisioner{
"shell-local": func() (packersdk.Provisioner, error) { return &shell_local.Provisioner{}, nil },
Expand Down
Loading