Add infrastructure agent binary build workflow***

***Update gitignore to include infrastructure agent files***

***Update package.json and tsconfig.json for infrastructure agent
This commit is contained in:
Simon Larsen 2024-03-06 14:55:26 +00:00
parent 1cbd6fa403
commit 9224748eff
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
8 changed files with 40 additions and 5 deletions

View File

@ -763,4 +763,15 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: cd HelmChart && cd Tests && bash index.sh
- run: cd HelmChart && cd Tests && bash index.sh
infrastrucutre-agent-macos-binary-build:
runs-on: macos-latest
needs: [test-helm-chart]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: cd InfrastructureAgent && bash Scripts/Build/Mac.sh
-

5
.gitignore vendored
View File

@ -98,4 +98,7 @@ Llama/Models/llama*
Llama/__pycache__/*
Examples/otel-dotnet/obj/*
Examples/otel-dotnet/obj/*
InfrastructureAgent/sea-prep.blob
InfrastructureAgent/InfrastrctureAgent

View File

@ -0,0 +1,6 @@
node --experimental-sea-config sea-config.json
cp $(command -v node) InfrastrctureAgent
npx postject hello NODE_SEA_BLOB sea-prep.blob \
--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2

View File

@ -0,0 +1,10 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
node --experimental-sea-config $SCRIPT_DIR/../../sea-config.json
cp $(command -v node) InfrastrctureAgent
codesign --remove-signature InfrastrctureAgent
npm i postject -g
npx postject InfrastrctureAgent NODE_SEA_BLOB sea-prep.blob \
--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
--macho-segment-name NODE_SEA
codesign --sign - InfrastrctureAgent

View File

@ -2,7 +2,8 @@
"name": "infrastructure-agent",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"main": "./build/dist/Index.js",
"scripts": {
"start": "node --require ts-node/register Index.ts",
"compile": "tsc",

View File

@ -0,0 +1,4 @@
{
"main": "./build/dist/Index.js",
"output": "sea-prep.blob"
}

View File

@ -18,7 +18,7 @@
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
/* Language and Environment */
"target": "es2017" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"target": "es2015" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
"jsx": "react" /* Specify what JSX code is generated. */,
"experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
@ -40,7 +40,7 @@
"typeRoots": [
"./node_modules/@types"
], /* Specify multiple folders that act like `./node_modules/@types`. */
"types": ["node", "jest"], /* Specify type package names to be included without being referenced in a source file. */
"types": ["node"], /* Specify type package names to be included without being referenced in a source file. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
// "resolveJsonModule": true, /* Enable importing .json files */
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */