fix: allow the docker registry to be passed in if its defined
@@ -76,6 +76,11 @@ func (b *PipelineBuilder) Create(request *PipelineOptions, metapipelineClient me
sa = "tekton-bot"
}
+ envVars := map[string]string{}
+ registry := os.Getenv("DOCKER_REGISTRY")
+ if registry != "" {
+ envVars["DOCKER_REGISTRY"] = registry
+ }
pipelineCreateParam := metapipeline.PipelineCreateParam{
PullRef: pullRefData,
PipelineKind: kind,
@@ -86,6 +91,7 @@ func (b *PipelineBuilder) Create(request *PipelineOptions, metapipelineClient me
ServiceAccount: sa,
// I believe we can use an empty string default image?
DefaultImage: "",
+ EnvVariables: envVars,
}
pipelineActivity, tektonCRDs, err := metapipelineClient.Create(pipelineCreateParam)
