stable
Clone or download
This patch removes the 'pre-receive-hook-example' wasm module that was used by default with the command. Modules are now loaded "per-repository", and need to be put under /var/lib/tuleap/untrusted-code/git/pre-receive-hook/<repo-id>.wasm to be loaded when executing the command. To build and test libwasmtimewrapper.so: - Build pre-receive-hook-example.wasm (as described above) - cd tuleap/src/additional-packages/wasmtime-wrapper-lib/ - nix-shell - cargo zigbuild --target x86_64-unknown-linux-gnu.2.17 --release - cargo test To test the command: - tuleap config-set feature_flag_enable_pre_receive_analyze_command 1 (set the feature flag) - Put a valid WASM module under /var/lib/tuleap/untrusted-code/git/pre-receive-hook/<repo-id>.wasm - tuleap git:pre-receive-analyze <repository_id> <old_value new_value ref_name>... (launch the command with valid parameters) Part of story #28845 have an hidden command executing custom command to determine if the reference should have been rejected Change-Id: I56d824793892f93211bbcf4e4e1d624f53248269
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/git/include/Hook/PreReceive/PreReceiveAnalyzeAction.php | +16 | −2 | Go to diff View file |
M | plugins/git/include/Hook/PreReceive/PreReceiveAnalyzeCommand.php | +3 | −0 | Go to diff View file |
R | src/additional-packages/pre-receive-hook-example/src/wire.rs | Go to diff View file | ||
M | plugins/git/tests/unit/Hook/PreReceive/PreReceiveAnalyzeActionTest.php | +41 | −4 | Go to diff View file |
D | src/additional-packages/pre-receive-hook-example/.gitignore | +0 | −8 | Go to diff View file |
D | src/additional-packages/pre-receive-hook-example/Cargo.lock | +0 | −89 | Go to diff View file |
D | src/additional-packages/pre-receive-hook-example/Cargo.toml | +0 | −8 | Go to diff View file |
D | src/additional-packages/pre-receive-hook-example/shell.nix | +0 | −10 | Go to diff View file |
D | src/additional-packages/pre-receive-hook-example/src/main.rs | +0 | −62 | Go to diff View file |
M | src/additional-packages/wasmtime-wrapper-lib/src/lib.rs | +9 | −77 | Go to diff View file |
M | src/additional-packages/wasmtime-wrapper-lib/src/wire.rs | +2 | −12 | Go to diff View file |
M | src/additional-packages/wasmtime-wrapper-lib/test-wasm-modules/Cargo.toml | +4 | −4 | Go to diff View file |
R | src/additional-packages/wasmtime-wrapper-lib/test-wasm-modules/src/wrong-json/main.rs | Go to diff View file | ||
M | src/common/WebAssembly/FFIWASMCaller.php | +2 | −3 | Go to diff View file |
M | src/common/WebAssembly/WASMCaller.php | +1 | −1 | Go to diff View file |