77 "github.com/go-logr/logr"
88 v12 "k8s.io/apimachinery/pkg/apis/meta/v1"
99 "net/url"
10+ "os"
1011 "regexp"
1112 "strconv"
1213 "strings"
@@ -30,6 +31,8 @@ const (
3031 BuildTaskName = "build"
3132 PostBuildTaskName = "post-build"
3233 DeployTaskName = "deploy"
34+
35+ DomainProxyImage = "quay.io/redhat-user-workloads/konflux-jbs-pnc-tenant/domain-proxy:latest"
3336)
3437
3538//go:embed scripts/maven-build.sh
@@ -481,7 +484,7 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
481484 },
482485 }
483486
484- whitelistUrl , err := url .Parse (cacheUrl )
487+ allowlistUrl , err := url .Parse (cacheUrl )
485488 if err != nil {
486489 return nil , "" , err
487490 }
@@ -542,7 +545,7 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
542545 Name : "BUILD_IMAGE" ,
543546 Value : tektonpipeline.ParamValue {
544547 Type : tektonpipeline .ParamTypeString ,
545- StringVal : DomainProxyImage ,
548+ StringVal : domainProxyImage () ,
546549 },
547550 },
548551 {
@@ -553,10 +556,10 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
553556 },
554557 },
555558 {
556- Name : "DOMAIN_PROXY_TARGET_WHITELIST " ,
559+ Name : "DOMAIN_PROXY_TARGET_ALLOWLIST " ,
557560 Value : tektonpipeline.ParamValue {
558561 Type : tektonpipeline .ParamTypeString ,
559- StringVal : whitelistUrl .Host + ",localhost,cdn-ubi.redhat.com,repo1.maven.org,repo.scala-sbt.org,scala.jfrog.io,repo.typesafe.com,jfrog-prod-usw2-shared-oregon-main.s3.amazonaws.com" ,
562+ StringVal : allowlistUrl .Host + ",localhost,cdn-ubi.redhat.com,repo1.maven.org,repo.scala-sbt.org,scala.jfrog.io,repo.typesafe.com,jfrog-prod-usw2-shared-oregon-main.s3.amazonaws.com" ,
560563 },
561564 },
562565 {
@@ -591,7 +594,7 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
591594 Name : "DOMAIN_PROXY_INTERNAL_NON_PROXY_HOSTS" ,
592595 Value : tektonpipeline.ParamValue {
593596 Type : tektonpipeline .ParamTypeString ,
594- StringVal : whitelistUrl .Host + ",localhost" ,
597+ StringVal : allowlistUrl .Host + ",localhost" ,
595598 },
596599 },
597600 },
@@ -991,3 +994,11 @@ func settingOrDefault(setting, def string) string {
991994 }
992995 return setting
993996}
997+
998+ func domainProxyImage () string {
999+ domainProxyImage := os .Getenv ("JVM_BUILD_SERVICE_DOMAIN_PROXY_IMAGE" )
1000+ if len (domainProxyImage ) == 0 {
1001+ domainProxyImage = DomainProxyImage
1002+ }
1003+ return domainProxyImage
1004+ }
0 commit comments