From 690d54aaf9335b759e6b51b507257ac3f91735e4 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 1 Jun 2017 09:02:09 -0700 Subject: [PATCH 1/4] add warning about vagrant.box vms being uploaded to atlas --- post-processor/atlas/post-processor.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/post-processor/atlas/post-processor.go b/post-processor/atlas/post-processor.go index 587942631..28ac35bf1 100644 --- a/post-processor/atlas/post-processor.go +++ b/post-processor/atlas/post-processor.go @@ -138,11 +138,19 @@ func (p *PostProcessor) Configure(raws ...interface{}) error { return errs } } - return nil } func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, error) { + // todo: remove/reword after the migration + if p.config.Type == "vagrant.box" { + ui.Message("\n-----------------------------------------------------------------------------------\n" + + "Warning: Vagrant-related functionality will be moved from Terraform Enterprise into " + + "its own product, Vagrant Cloud. This migration is currently planned for June 27th, " + + "2017 at 6PM EDT/3PM PDT/10PM UTC. For more information see " + + "https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html\n" + + "-----------------------------------------------------------------------------------\n") + } if _, err := p.client.Artifact(p.config.user, p.config.name); err != nil { if err != atlas.ErrNotFound { return nil, false, fmt.Errorf( From b31f8bb0f6bdee6b6c3f6e550e885d70bd19831c Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 1 Jun 2017 11:25:53 -0700 Subject: [PATCH 2/4] clean up formatting and add warning to packer push. --- command/push.go | 9 +++++++++ post-processor/atlas/post-processor.go | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/command/push.go b/command/push.go index a0edd6b84..f2432c252 100644 --- a/command/push.go +++ b/command/push.go @@ -177,6 +177,15 @@ func (c *PushCommand) Run(args []string) int { uploadOpts.Builds = make(map[string]*uploadBuildInfo) for _, b := range tpl.Builders { info := &uploadBuildInfo{Type: b.Type} + // todo: remove post-migration + if b.Type == "vagrant" { + c.Ui.Message("\n-----------------------------------------------------------------------------------\n" + + "Warning: Vagrant-related functionality will be moved from Terraform Enterprise into \n" + + "its own product, Vagrant Cloud. This migration is currently planned for June 27th, \n" + + "2017 at 6PM EDT/3PM PDT/10PM UTC. For more information see \n" + + "https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html\n" + + "-----------------------------------------------------------------------------------\n") + } // Determine if we're artifacting this build for _, pp := range atlasPPs { diff --git a/post-processor/atlas/post-processor.go b/post-processor/atlas/post-processor.go index 28ac35bf1..ad0456c79 100644 --- a/post-processor/atlas/post-processor.go +++ b/post-processor/atlas/post-processor.go @@ -145,9 +145,9 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac // todo: remove/reword after the migration if p.config.Type == "vagrant.box" { ui.Message("\n-----------------------------------------------------------------------------------\n" + - "Warning: Vagrant-related functionality will be moved from Terraform Enterprise into " + - "its own product, Vagrant Cloud. This migration is currently planned for June 27th, " + - "2017 at 6PM EDT/3PM PDT/10PM UTC. For more information see " + + "Warning: Vagrant-related functionality will be moved from Terraform Enterprise into \n" + + "its own product, Vagrant Cloud. This migration is currently planned for June 27th, \n" + + "2017 at 6PM EDT/3PM PDT/10PM UTC. For more information see \n" + "https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html\n" + "-----------------------------------------------------------------------------------\n") } From 1c1db91715c6952411ea373337c01042ce2b5a7b Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Wed, 7 Jun 2017 13:20:02 -0700 Subject: [PATCH 3/4] add instructions --- command/push.go | 3 +++ post-processor/atlas/post-processor.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/command/push.go b/command/push.go index f2432c252..bf67372cc 100644 --- a/command/push.go +++ b/command/push.go @@ -184,6 +184,9 @@ func (c *PushCommand) Run(args []string) int { "its own product, Vagrant Cloud. This migration is currently planned for June 27th, \n" + "2017 at 6PM EDT/3PM PDT/10PM UTC. For more information see \n" + "https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html\n" + + "In the meantime, you should activate your vagrant cloud account and start replacing your \n" + + "Atlas post-processor with the vagrant cloud post-processor. See\n" + + "https://www.packer.io/docs/post-processors/vagrant-cloud.html for more details." + "-----------------------------------------------------------------------------------\n") } diff --git a/post-processor/atlas/post-processor.go b/post-processor/atlas/post-processor.go index ad0456c79..98adc4f9b 100644 --- a/post-processor/atlas/post-processor.go +++ b/post-processor/atlas/post-processor.go @@ -149,6 +149,9 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac "its own product, Vagrant Cloud. This migration is currently planned for June 27th, \n" + "2017 at 6PM EDT/3PM PDT/10PM UTC. For more information see \n" + "https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html\n" + + "In the meantime, you should activate your vagrant cloud account and start replacing your \n" + + "Atlas post-processor with the vagrant cloud post-processor. See\n" + + "https://www.packer.io/docs/post-processors/vagrant-cloud.html for more details." + "-----------------------------------------------------------------------------------\n") } if _, err := p.client.Artifact(p.config.user, p.config.name); err != nil { From dbd7aa6b95781501d69434f5f523d45d9eab04f6 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Wed, 7 Jun 2017 13:30:39 -0700 Subject: [PATCH 4/4] capitalize all the things --- command/push.go | 4 ++-- post-processor/atlas/post-processor.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/push.go b/command/push.go index bf67372cc..7a54a87dc 100644 --- a/command/push.go +++ b/command/push.go @@ -184,8 +184,8 @@ func (c *PushCommand) Run(args []string) int { "its own product, Vagrant Cloud. This migration is currently planned for June 27th, \n" + "2017 at 6PM EDT/3PM PDT/10PM UTC. For more information see \n" + "https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html\n" + - "In the meantime, you should activate your vagrant cloud account and start replacing your \n" + - "Atlas post-processor with the vagrant cloud post-processor. See\n" + + "In the meantime, you should activate your Vagrant Cloud account and replace your \n" + + "Atlas post-processor with the Vagrant Cloud post-processor. See\n" + "https://www.packer.io/docs/post-processors/vagrant-cloud.html for more details." + "-----------------------------------------------------------------------------------\n") } diff --git a/post-processor/atlas/post-processor.go b/post-processor/atlas/post-processor.go index 98adc4f9b..9dad49b25 100644 --- a/post-processor/atlas/post-processor.go +++ b/post-processor/atlas/post-processor.go @@ -149,8 +149,8 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac "its own product, Vagrant Cloud. This migration is currently planned for June 27th, \n" + "2017 at 6PM EDT/3PM PDT/10PM UTC. For more information see \n" + "https://www.vagrantup.com/docs/vagrant-cloud/vagrant-cloud-migration.html\n" + - "In the meantime, you should activate your vagrant cloud account and start replacing your \n" + - "Atlas post-processor with the vagrant cloud post-processor. See\n" + + "In the meantime, you should activate your Vagrant Cloud account and replace your \n" + + "Atlas post-processor with the Vagrant Cloud post-processor. See\n" + "https://www.packer.io/docs/post-processors/vagrant-cloud.html for more details." + "-----------------------------------------------------------------------------------\n") }