grim/convey
Clone
Summary
Browse
Changes
Graph
remove a bunch of debug output from the fs copy stuff
redux
2021-12-18, Gary Kramlich
86694452d869
remove a bunch of debug output from the fs copy stuff
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/tasks"
"keep.imfreedom.org/grim/convey/yaml"
)
type
Pull
struct
{
Tags
yaml
.
StringOrSlice
`yaml:"tags"`
}
func
(
p
*
Pull
)
Execute
(
name
string
,
logger
*
log
.
Entry
,
stageEnv
environment
.
Environment
,
rt
*
runtime
.
Runtime
)
error
{
env
:=
stageEnv
.
Copy
().
Merge
(
rt
.
Environment
)
tags
:=
env
.
Expandv
(
p
.
Tags
)
for
_
,
tag
:=
range
tags
{
generator
:=
exec
.
NewGenerator
(
"podman"
,
"pull"
,
tag
,
)
err
:=
exec
.
Run
(
name
,
generator
.
Command
(),
rt
.
Timeout
)
if
err
!=
nil
{
return
err
}
}
return
nil
}
func
(
p
*
Pull
)
New
()
tasks
.
Task
{
return
&
Pull
{}
}
func
(
p
*
Pull
)
Valid
()
error
{
if
len
(
p
.
Tags
)
==
0
{
return
ErrNoTags
}
return
nil
}
func
(
p
*
Pull
)
Deprecated
()
error
{
return
nil
}