Skip to content

Commit 8c827aa

Browse files
committed
Try specifying IP address instead. Also enable hermetic mode.
1 parent 7095ef9 commit 8c827aa

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

deploy/tasks/buildah-oci-ta.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,9 @@ spec:
291291
cp "$dockerfile_path" "$dockerfile_copy"
292292
293293
if [ -n "$JVM_BUILD_WORKSPACE_ARTIFACT_CACHE_PORT_80_TCP_ADDR" ] && grep -q '^\s*RUN \(./\)\?mvn' "$dockerfile_copy"; then
294-
settings="<settings><proxies><proxy><id>domain-proxy</id><active>true</active><protocol>http</protocol><host>localhost</host><port>8080</port></proxy></proxies><mirrors><mirror><id>mirror.default</id><url>http://$JVM_BUILD_WORKSPACE_ARTIFACT_CACHE_PORT_80_TCP_ADDR/v1/cache/default/0/</url><mirrorOf>*</mirrorOf></mirror></mirrors></settings>"
294+
settings="<settings><proxies><proxy><id>domain-proxy</id><active>true</active><protocol>http</protocol><host>127.0.0.1</host><port>8080</port></proxy></proxies><mirrors><mirror><id>mirror.default</id><url>http://$JVM_BUILD_WORKSPACE_ARTIFACT_CACHE_PORT_80_TCP_ADDR/v1/cache/default/0/</url><mirrorOf>*</mirrorOf></mirror></mirrors></settings>"
295295
else
296-
settings="<settings><proxies><proxy><id>domain-proxy</id><active>true</active><protocol>http</protocol><host>localhost</host><port>8080</port></proxy></proxies></settings>"
296+
settings="<settings><proxies><proxy><id>domain-proxy</id><active>true</active><protocol>http</protocol><host>127.0.0.1</host><port>8080</port></proxy></proxies></settings>"
297297
fi
298298
sed -i -e "s|^\s*RUN \(\(./\)\?mvn\)\(.*\)|RUN echo \"$settings\" > /tmp/settings.yaml; \1 -s /tmp/settings.yaml \3|g" "$dockerfile_copy"
299299
touch /var/lib/containers/java
@@ -467,7 +467,6 @@ spec:
467467
# Without expansion
468468
cat > /app/build-script.sh << 'EOF'
469469
#!/bin/sh
470-
ip link set dev lo up
471470
/app/domain-proxy-client-runner &
472471
client_pid=$!
473472
EOF
@@ -524,7 +523,6 @@ spec:
524523
capabilities:
525524
add:
526525
- SETFCAP
527-
- NET_ADMIN
528526
- name: sbom-syft-generate
529527
image: registry.access.redhat.com/rh-syft-tech-preview/syft-rhel9:1.4.1@sha256:34d7065427085a31dc4949bd283c001b91794d427e1e4cdf1b21ea4faf9fee3f
530528
workingDir: /var/workdir/source

java-components/domain-proxy/server/src/main/java/com/redhat/hacbs/domainproxy/DomainProxyServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@Singleton
2828
public class DomainProxyServer {
2929

30-
static final String LOCALHOST = "localhost";
30+
static final String LOCALHOST = "127.0.0.1";
3131

3232
@Inject
3333
@ConfigProperty(name = "server-domain-socket")

pkg/reconciler/dependencybuild/buildrecipeyaml.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,13 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi
530530
StringVal: domainProxyImage,
531531
},
532532
},
533+
{
534+
Name: "HERMETIC",
535+
Value: tektonpipeline.ParamValue{
536+
Type: tektonpipeline.ParamTypeString,
537+
StringVal: "true",
538+
},
539+
},
533540
},
534541
}}, ps.Tasks...)
535542

0 commit comments

Comments
 (0)