mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
CI: package committed binaries and example into two release artifacts
Drop on-the-fly compilation; the binaries and example JARs are now committed to the repo. Jenkinsfile packages and archives: - JuiceAgent-windows-x64.zip (pure binaries) - JuiceAgent-windows-x64-examples.zip (binaries + runnable example) Update examples/.gitignore to track prebuilt artifacts.
This commit is contained in:
1 parent
1f80df0af0
commit
c5889cb338
9 files changed
+43
-18
No files matched your search
Vendored
+3
-3
@@ -11,16 +11,16 @@ pipeline {
|
||||
sh 'docker build -t juiceagent-builder:latest .'
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
stage('Package') {
|
||||
steps {
|
||||
sh 'docker run --rm -v "$WORKSPACE:/workspace" juiceagent-builder:latest bash -lc "cd /workspace && rm -rf build-mingw && cmake --preset mingw-release && cmake --build build-mingw && cd build-mingw/bin && zip -9 -j /workspace/JuiceAgent-windows-x64.zip *.exe *.dll"'
|
||||
sh 'docker run --rm -v "$WORKSPACE:/workspace" juiceagent-builder:latest bash -lc "cd /workspace && bash tools/build-release.sh"'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts artifacts: 'JuiceAgent-windows-x64.zip', fingerprint: true, allowEmptyArchive: false
|
||||
archiveArtifacts artifacts: 'JuiceAgent-windows-x64.zip, JuiceAgent-windows-x64-examples.zip', fingerprint: true, allowEmptyArchive: false
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-15
@@ -1,17 +1,3 @@
|
||||
# Compiled Java / build outputs
|
||||
load-via-injector-exe/demo.jar
|
||||
load-via-injector-exe/target.jar
|
||||
load-via-injector-exe/injection/out/*
|
||||
load-via-injector-exe/target/out/*
|
||||
# Temporary build directories
|
||||
**/out/*
|
||||
**/*.class
|
||||
|
||||
# JuiceAgent runtime binaries copied into examples
|
||||
load-via-injector-exe/injector.exe
|
||||
load-via-injector-exe/libagent.dll
|
||||
load-via-injector-exe/libinject.dll
|
||||
load-via-injector-exe/libloader.dll
|
||||
**/injector.exe
|
||||
**/libagent.dll
|
||||
**/libinject.dll
|
||||
**/libloader.dll
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# JuiceAgent release packaging script.
|
||||
# The binaries and example JARs are committed to the repository, so this
|
||||
# script only packages them. Runs inside the juiceagent-builder container.
|
||||
# Produces two artifacts:
|
||||
# 1. JuiceAgent-windows-x64.zip - pure compiled binaries
|
||||
# 2. JuiceAgent-windows-x64-examples.zip - binaries + runnable example
|
||||
#
|
||||
set -e
|
||||
|
||||
cd /workspace
|
||||
|
||||
EXAMPLE_DIR=examples/load-via-injector-exe
|
||||
|
||||
echo "========================================"
|
||||
echo " [1/2] Packaging pure binaries"
|
||||
echo "========================================"
|
||||
rm -f /workspace/JuiceAgent-windows-x64.zip
|
||||
cd "$EXAMPLE_DIR"
|
||||
zip -9 -j /workspace/JuiceAgent-windows-x64.zip injector.exe libagent.dll libloader.dll libinject.dll
|
||||
cd /workspace
|
||||
|
||||
echo "========================================"
|
||||
echo " [2/2] Packaging binaries + example"
|
||||
echo "========================================"
|
||||
rm -rf /workspace/release-examples
|
||||
mkdir -p /workspace/release-examples
|
||||
cp -r "$EXAMPLE_DIR/." /workspace/release-examples/
|
||||
|
||||
rm -f /workspace/JuiceAgent-windows-x64-examples.zip
|
||||
cd /workspace/release-examples
|
||||
zip -9 -r /workspace/JuiceAgent-windows-x64-examples.zip .
|
||||
cd /workspace
|
||||
|
||||
echo "========================================"
|
||||
echo " Done. Artifacts:"
|
||||
ls -lh /workspace/JuiceAgent-windows-x64.zip /workspace/JuiceAgent-windows-x64-examples.zip
|
||||
echo "========================================"
|
||||
Reference in new issue
Block a user