Skip to content

Commit c3cd21d

Browse files
committed
Refine.
1 parent c3df615 commit c3cd21d

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

deploy/tasks/buildah-oci-ta.yaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ spec:
411411
use_domain_proxy=true
412412
echo "Build will be executed with domain proxy"
413413
java -jar /domain-proxy-server/quarkus-app/quarkus-run.jar &
414-
server_pid=$!
415414
fi
416415
fi
417416
@@ -511,15 +510,14 @@ spec:
511510
512511
if [ "$use_domain_proxy" == "true" ]; then
513512
# Without expansion
514-
cat >> /app/build-script.sh << 'EOF'
513+
cat >> /build-script.sh << 'EOF'
515514
#!/bin/sh
516515
ip link set lo up
517516
java -jar /domain-proxy-client/quarkus-app/quarkus-run.jar &
518-
client_pid=$!
519517
EOF
520518
521519
# With expansion
522-
cat >> /app/build-script.sh << EOF
520+
cat >> /build-script.sh << EOF
523521
for ((i=1; i<=30; i++)); do
524522
echo "request #$i"
525523
curl --max-time 30 -v -x http://localhost:8080 "http://${CACHE_HOST}/v2/cache/rebuild-central/1658389751000/org/sonatype/oss/oss-parent/7/oss-parent-7.pom"
@@ -528,21 +526,19 @@ spec:
528526
EOF
529527
530528
# Without expansion
531-
cat >> /app/build-script.sh << 'EOF'
529+
cat >> /build-script.sh << 'EOF'
532530
set +e
533-
kill $client_pid
534-
wait $client_pid
531+
killall -9 java
535532
set -e
536533
EOF
537534
538-
cat /app/build-script.sh
539-
chmod +x /app/build-script.sh
535+
cat /build-script.sh
536+
chmod +x /build-script.sh
540537
541-
unshare -Uf $UNSHARE_ARGS --keep-caps -r --map-users 1,1,65536 --map-groups 1,1,65536 -w ${SOURCE_CODE_DIR}/$CONTEXT -- /app/build-script.sh
538+
unshare -Uf $UNSHARE_ARGS --keep-caps -r --map-users 1,1,65536 --map-groups 1,1,65536 -w ${SOURCE_CODE_DIR}/$CONTEXT -- /build-script.sh
542539
543540
set +e
544-
kill $server_pid
545-
wait $server_pid
541+
killall -9 java
546542
set -e
547543
else
548544
unshare -Uf $UNSHARE_ARGS --keep-caps -r --map-users 1,1,65536 --map-groups 1,1,65536 -w ${SOURCE_CODE_DIR}/$CONTEXT -- buildah build \

0 commit comments

Comments
 (0)