Skip to content

Commit 6f1e500

Browse files
committed
Handle copying temporary files to container
1 parent 7fc366c commit 6f1e500

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test-in-k8s.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ tcp_port=$((2001 + port_offset))
1414
kubectl delete --ignore-not-found --now pod jenkins
1515
sed "s/@HTTP_PORT@/$http_port/g; s/@TCP_PORT@/$tcp_port/g" < test-in-k8s.yaml | kubectl apply -f -
1616
kubectl wait --for=condition=Ready --timeout=15m pod/jenkins
17+
# Copy temporary split files
18+
kubectl exec jenkins -- mkdir "$WORKSPACE_TMP"
19+
tar cf - "$WORKSPACE_TMP" | kubectl exec -i jenkins -- tar xf - -C "$WORKSPACE_TMP"
20+
# Copy plugin files
1721
kubectl exec jenkins -- mkdir /checkout
18-
kubectl cp pom.xml jenkins:/checkout/pom.xml
19-
kubectl cp .mvn jenkins:/checkout/.mvn
20-
kubectl cp src jenkins:/checkout/src
22+
tar cf - pom.xml .mvn src | kubectl exec -i jenkins -- tar xf - -C /checkout
2123
kubectl exec jenkins -- \
2224
mvn \
2325
-B \

0 commit comments

Comments
 (0)