grim/convey
Clone
Summary
Browse
Changes
Graph
Add the recursive environment expanding back with a much simplier algorithm
redux
2021-10-11, Gary Kramlich
d434a60a38b3
Add the recursive environment expanding back with a much simplier algorithm
package
docker
import
(
"fmt"
log
"github.com/sirupsen/logrus"
"keep.imfreedom.org/grim/convey/environment"
"keep.imfreedom.org/grim/convey/podman"
"keep.imfreedom.org/grim/convey/runtime"
"keep.imfreedom.org/grim/convey/tasks"
"keep.imfreedom.org/grim/convey/yaml"
)
type
Pull
struct
{
Image
string
`yaml:"image"`
Images
yaml
.
StringOrSlice
`yaml:"images"`
realPull
*
podman
.
Pull
}
func
(
p
*
Pull
)
Execute
(
name
string
,
logger
*
log
.
Entry
,
stageEnv
environment
.
Environment
,
rt
*
runtime
.
Runtime
)
error
{
return
p
.
realPull
.
Execute
(
name
,
logger
,
stageEnv
,
rt
)
}
func
(
p
*
Pull
)
New
()
tasks
.
Task
{
return
&
Pull
{}
}
func
(
p
*
Pull
)
Valid
()
error
{
if
p
.
Image
!=
""
{
p
.
Images
=
append
([]
string
{
p
.
Image
},
p
.
Images
...
)
}
p
.
realPull
=
&
podman
.
Pull
{
Tags
:
p
.
Images
,
}
return
p
.
realPull
.
Valid
()
}
func
(
p
*
Pull
)
Deprecated
()
error
{
return
fmt
.
Errorf
(
"docker/pull has been deprecated in favor of podman/pull since 0.15.0"
)
}