From 1c3c1f17d95b2c0743993c30b8431c4a64439cc7 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 25 Feb 2021 12:45:39 -0800 Subject: [PATCH] stop generating plugins file to make it possible to vendor plugins --- command/plugin.go | 19 +++++++++++++++---- main.go | 1 - 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/command/plugin.go b/command/plugin.go index 2e039ed6c..cb378dec3 100644 --- a/command/plugin.go +++ b/command/plugin.go @@ -1,7 +1,3 @@ -// -// This file is automatically generated by scripts/generate-plugins.go -- Do not edit! -// - package command import ( @@ -13,6 +9,16 @@ import ( packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/plugin" + // Previously core-bundled components, split into their own plugins but + // still vendored with Packer for now. Importing as library instead of + // forcing use of packer init, until packer v1.8.0 + dockerbuilder "github.com/hashicorp/packer-plugin-docker/builder/docker" + dockerimportpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-import" + dockerpushpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-push" + dockersavepostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-save" + dockertagpostprocessor "github.com/hashicorp/packer-plugin-docker/post-processor/docker-tag" + + // These components are still built into the packer core repo alicloudecsbuilder "github.com/hashicorp/packer/builder/alicloud/ecs" amazonchrootbuilder "github.com/hashicorp/packer/builder/amazon/chroot" amazonebsbuilder "github.com/hashicorp/packer/builder/amazon/ebs" @@ -120,6 +126,7 @@ var Builders = map[string]packersdk.Builder{ "azure-dtl": new(azuredtlbuilder.Builder), "cloudstack": new(cloudstackbuilder.Builder), "digitalocean": new(digitaloceanbuilder.Builder), + "docker": new(dockerbuilder.Builder), "file": new(filebuilder.Builder), "googlecompute": new(googlecomputebuilder.Builder), "hcloud": new(hcloudbuilder.Builder), @@ -190,6 +197,10 @@ var PostProcessors = map[string]packersdk.PostProcessor{ "checksum": new(checksumpostprocessor.PostProcessor), "compress": new(compresspostprocessor.PostProcessor), "digitalocean-import": new(digitaloceanimportpostprocessor.PostProcessor), + "docker-import": new(dockerimportpostprocessor.PostProcessor), + "docker-push": new(dockerpushpostprocessor.PostProcessor), + "docker-save": new(dockersavepostprocessor.PostProcessor), + "docker-tag": new(dockertagpostprocessor.PostProcessor), "exoscale-import": new(exoscaleimportpostprocessor.PostProcessor), "googlecompute-export": new(googlecomputeexportpostprocessor.PostProcessor), "googlecompute-import": new(googlecomputeimportpostprocessor.PostProcessor), diff --git a/main.go b/main.go index f7806b0bc..f358c2f05 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,5 @@ // This is the main package for the `packer` application. -//go:generate go run ./scripts/generate-plugins.go package main import (