Tag built container with build and run name
This commit is contained in:
@@ -132,6 +132,7 @@ func ExecutePipeline(pe PipelineExecution, db database.Database, pipelineConf co
|
||||
defer dockerBuildContext.Close()
|
||||
|
||||
buildResponse, err := cli.ImageBuild(context.Background(), dockerBuildContext, types.ImageBuildOptions{
|
||||
Tags: []string{fmt.Sprintf("%v-%v:latest", pe.Pipeline.Id.String(), pe.Run.Id.String())},
|
||||
Dockerfile: ".cursorius/Dockerfile",
|
||||
})
|
||||
if err != nil {
|
||||
@@ -139,7 +140,6 @@ func ExecutePipeline(pe PipelineExecution, db database.Database, pipelineConf co
|
||||
return
|
||||
}
|
||||
|
||||
log.Debugf("********* %s **********", buildResponse.OSType)
|
||||
response, err := ioutil.ReadAll(buildResponse.Body)
|
||||
if err != nil {
|
||||
log.Errorf("could no read build response: %w", err)
|
||||
@@ -147,8 +147,6 @@ func ExecutePipeline(pe PipelineExecution, db database.Database, pipelineConf co
|
||||
}
|
||||
log.Debugf("build log: %v", string(response))
|
||||
|
||||
return
|
||||
|
||||
imageName := "git.ohea.xyz/cursorius/pipeline-api/cursorius-pipeline:v2"
|
||||
|
||||
log.Infof("Pulling image %v", imageName)
|
||||
|
||||
Reference in New Issue
Block a user