Compare commits

..

7 Commits

Author SHA1 Message Date
Ruben Fiszel
9016ea5fca all 2025-02-18 17:44:14 +01:00
Ruben Fiszel
f321c5d093 all 2025-02-18 17:43:03 +01:00
Ruben Fiszel
4e2fa3d022 push 2025-02-18 17:36:39 +01:00
Ruben Fiszel
72b0431274 push 2025-02-18 17:24:24 +01:00
Ruben Fiszel
7c4ce55f18 push 2025-02-18 17:15:47 +01:00
Ruben Fiszel
d4f61f13fd fix(bash): allow process substitution on nsjail 2025-02-18 16:46:42 +01:00
Ruben Fiszel
138cedf1da fix(bash): improve bash last line as result reliability using bash process substitution (#5321) 2025-02-18 15:13:28 +01:00
4 changed files with 38 additions and 23 deletions

View File

@@ -22,7 +22,7 @@ jobs:
windmill:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -64,7 +64,7 @@ jobs:
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
windmill:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -106,7 +106,7 @@ jobs:
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
windmill:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -119,7 +119,7 @@ jobs:
ports:
- 8000:8000
windmill_1:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -130,7 +130,7 @@ jobs:
--pull always
windmill_2:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -141,7 +141,7 @@ jobs:
--pull always
windmill_3:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -183,7 +183,7 @@ jobs:
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
windmill:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -196,7 +196,7 @@ jobs:
ports:
- 8000:8000
windmill_1:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -207,7 +207,7 @@ jobs:
--pull always
windmill_2:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -218,7 +218,7 @@ jobs:
--pull always
windmill_3:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -229,7 +229,7 @@ jobs:
--pull always
windmill_4:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -240,7 +240,7 @@ jobs:
--pull always
windmill_5:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -251,7 +251,7 @@ jobs:
--pull always
windmill_6:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}
@@ -262,7 +262,7 @@ jobs:
--pull always
windmill_7:
image: ghcr.io/windmill-labs/windmill-ee:main
image: ghcr.io/windmill-labs/windmill-ee:1.463.6
env:
DATABASE_URL: postgres://postgres:changeme@postgres:5432/windmill
LICENSE_KEY: ${{ secrets.WM_LICENSE_KEY_CI }}

View File

@@ -21,10 +21,24 @@ mount {
is_bind: true
}
mount {
src: "/proc/self/fd"
dst: "/dev/fd"
is_symlink: true
mandatory: false
}
mount {
src: "/bin"
dst: "/bin"
is_bind: true
}
mount {
src: "/opt/microsoft"
dst: "/opt/microsoft"
is_bind: true
mandatory: false
}
mount {

View File

@@ -21,6 +21,13 @@ mount {
is_bind: true
}
mount {
src: "/proc/self/fd"
dst: "/dev/fd"
is_symlink: true
mandatory: false
}
mount {
src: "/opt/microsoft"
dst: "/opt/microsoft"

View File

@@ -97,7 +97,7 @@ cleanup() {{
trap '' SIGTERM SIGINT
# Kill the process group of the script (negative PID value)
pkill -P $$
pkill -P $$ 2>/dev/null || true
exit
}}
@@ -105,14 +105,9 @@ cleanup() {{
# Trap SIGTERM (or other signals) and call cleanup function
trap cleanup SIGTERM SIGINT
# Create a named pipe
mkfifo bp
# Start background processes
cat bp | tail -1 >> ./result2.out &
# Run main.sh in the same process group
{bash} ./main.sh "$@" 2>&1 | tee bp &
{bash} ./main.sh "$@" 2>&1 | tee >(tail -1 >> ./result2.out) &
pid=$!
@@ -121,7 +116,6 @@ wait $pid
exit_status=$?
# Clean up the named pipe and background processes
rm -f bp
pkill -P $$ || true
# Exit with the captured status
@@ -624,7 +618,7 @@ $env:PSModulePath = \"{};$PSModulePathBackup\"",
write_file(
job_dir,
"wrapper.sh",
&format!("set -o pipefail\nset -e\nmkfifo bp\ncat bp | tail -1 > ./result2.out &\n{} -F ./main.ps1 \"$@\" 2>&1 | tee bp\nwait $!", POWERSHELL_PATH.as_str()),
&format!("set -o pipefail\nset -e\n{} -F ./main.ps1 \"$@\" 2>&1 | tee >(tail -1 >> ./result2.out) &\nwait $!", POWERSHELL_PATH.as_str()),
)?;
#[cfg(windows)]