task: add new task for build unpacker image

oscar-next
oscarzhou 2023-01-08 21:35:48 +13:00
parent c9e3696ffd
commit 2839a68c6a
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
package unpacker
import (
"ocl/portainer-devtool/configs"
"ocl/portainer-devtool/tasks/common"
"ocl/portainer-devtool/utils"
)
type BuildDockerImageSubTask struct {
common.GeneralTask
}
func NewBuildDockerImageSubTask(cfg *configs.Config) *BuildDockerImageSubTask {
return &BuildDockerImageSubTask{
GeneralTask: *common.NewGeneralTask(cfg),
}
}
func (task *BuildDockerImageSubTask) Execute() error {
utils.SuccessPrint(`
docker image tag docker.io/portainer/compose-unpacker:latest oscarzhou/compose-unpacker:28
docker image push oscarzhou/compose-unpacker:28
`)
return nil
}
func (task *BuildDockerImageSubTask) String() string {
return "Build Docker Image"
}