grim/convey

Create a zip file for the docs

11 months ago, Gary Kramlich
c6695a974177
Create a zip file for the docs

Also renamed `convey-docs.yml` as it was getting deleted by the convey clean plan previously.

Testing Done:
Ran locally and verified the zip file was structured correctly.

Reviewed at https://reviews.imfreedom.org/r/2469/
package podman
import (
log "github.com/sirupsen/logrus"
"keep.imfreedom.org/grim/convey/environment"
"keep.imfreedom.org/grim/convey/exec"
"keep.imfreedom.org/grim/convey/runtime"
"keep.imfreedom.org/grim/convey/yaml"
)
type Tag struct {
Image string `yaml:"image"`
Targets yaml.StringOrSlice `yaml:"targets"`
}
func (t *Tag) Execute(name string, logger *log.Entry, stageEnv environment.Environment, rt *runtime.Runtime) error {
env := stageEnv.Copy().Merge(rt.Environment)
generator := exec.NewGenerator(
"podman",
"tag",
t.Image,
)
generator.Appendv(env.Expandv(t.Targets))
return exec.Run(name, generator.Command(), rt.Timeout)
}
func (t *Tag) New() runtime.Task {
return &Tag{}
}
func (t *Tag) Valid() error {
if t.Image == "" {
return ErrNoImage
}
if len(t.Targets) == 0 {
return ErrNoTargets
}
return nil
}
func (t *Tag) Deprecated() error {
return nil
}