7
7
"github.com/go-logr/logr"
8
8
v12 "k8s.io/apimachinery/pkg/apis/meta/v1"
9
9
"net/url"
10
+ "os"
10
11
"regexp"
11
12
"strconv"
12
13
"strings"
@@ -30,6 +31,8 @@ const (
30
31
BuildTaskName = "build"
31
32
PostBuildTaskName = "post-build"
32
33
DeployTaskName = "deploy"
34
+
35
+ DomainProxyImage = "quay.io/redhat-user-workloads/konflux-jbs-pnc-tenant/domain-proxy:latest"
33
36
)
34
37
35
38
//go:embed scripts/maven-build.sh
@@ -481,7 +484,7 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
481
484
},
482
485
}
483
486
484
- whitelistUrl , err := url .Parse (cacheUrl )
487
+ allowlistUrl , err := url .Parse (cacheUrl )
485
488
if err != nil {
486
489
return nil , "" , err
487
490
}
@@ -542,7 +545,7 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
542
545
Name : "BUILD_IMAGE" ,
543
546
Value : tektonpipeline.ParamValue {
544
547
Type : tektonpipeline .ParamTypeString ,
545
- StringVal : DomainProxyImage ,
548
+ StringVal : domainProxyImage () ,
546
549
},
547
550
},
548
551
{
@@ -553,10 +556,10 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
553
556
},
554
557
},
555
558
{
556
- Name : "DOMAIN_PROXY_TARGET_WHITELIST " ,
559
+ Name : "DOMAIN_PROXY_TARGET_ALLOWLIST " ,
557
560
Value : tektonpipeline.ParamValue {
558
561
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" ,
560
563
},
561
564
},
562
565
{
@@ -591,7 +594,7 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
591
594
Name : "DOMAIN_PROXY_INTERNAL_NON_PROXY_HOSTS" ,
592
595
Value : tektonpipeline.ParamValue {
593
596
Type : tektonpipeline .ParamTypeString ,
594
- StringVal : whitelistUrl .Host + ",localhost" ,
597
+ StringVal : allowlistUrl .Host + ",localhost" ,
595
598
},
596
599
},
597
600
},
@@ -991,3 +994,11 @@ func settingOrDefault(setting, def string) string {
991
994
}
992
995
return setting
993
996
}
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