Tag built container with build and run name

This commit is contained in:
2023-02-24 22:32:24 -07:00
parent 77a5514578
commit 708fbca91a
+1 -3
View File
@@ -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)