Adding airlock_libs 1.0.3 to Master #24
@@ -0,0 +1,50 @@
|
|||||||
|
name: Build EXE and Release
|
||||||
|
run-name: ${{ gitea.actor }}
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Build and Release:
|
||||||
|
runs-on: debian-stable
|
||||||
|
env:
|
||||||
|
DISPLAY: :99
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Prerequisites
|
||||||
|
run: |
|
||||||
|
dpkg --add-architecture i386
|
||||||
|
apt update > /dev/null 2>&1
|
||||||
|
apt install git curl wine32:i386 xvfb -y > /dev/null 2>&1
|
||||||
|
|
||||||
|
- name: Start X Virtual Framebuffer (Xvfb)
|
||||||
|
run: |
|
||||||
|
# Start Xvfb in the background using the defined display number
|
||||||
|
Xvfb :99 -screen 0 1024x768x16 &
|
||||||
|
|
||||||
|
- name: Cloning Repository
|
||||||
|
run: |
|
||||||
|
git clone https://brotoskyj:${{ secrets.RUNNER_TOKEN }}@git.racooncity.org/brotoskyj/AirlockTools --branch RustImplementation
|
||||||
|
pwd
|
||||||
|
ls
|
||||||
|
|
||||||
|
- name: Setting Up Build Environment
|
||||||
|
run: |
|
||||||
|
apt install wine64 -y -qq > /dev/null 2>&1
|
||||||
|
curl -L -o python.exe https://www.python.org/ftp/python/3.13.9/python-3.13.9-amd64.exe
|
||||||
|
wine python.exe /quiet /NoWeb InstallAllUsers=1 PrependPath=1 TargetDir=C:/Python313
|
||||||
|
cp -r AirlockTools/ ~/.wine/drive_c/Python313/
|
||||||
|
cd ~/.wine/drive_c/Python313
|
||||||
|
wine python.exe -m pip install nuitka pywin32 keyring --break-system-packages
|
||||||
|
wine python.exe -m pip install -r AirlockTools/requirements.txt
|
||||||
|
wine python.exe -m pip install \
|
||||||
|
--index-url https://git.racooncity.org/api/packages/brotoskyj/pypi/simple/ \
|
||||||
|
airlock-libs --break-system-packages
|
||||||
|
|
||||||
|
- name: Build Executable
|
||||||
|
env:
|
||||||
|
DISPLAY: :99
|
||||||
|
WINEDEBUG: -all
|
||||||
|
run: |
|
||||||
|
xvfb-run -a wine cmd /c nuitka --onefile --onefile-windows-splash-screen-image=AirlockTools/loading.png --follow-imports --include-module=keyring.backends.Windows --include-module=win32cred --include-module=pywintypes --include-module=pythoncom --include-module=win32api --include-module=win32security --include-module=win32con --windows-product-name='LoXide' --windows-product-version='1.2.10.0' --windows-company-name='WVUM IRT' --windows-icon-from-ico=AirlockTools/IRT_icon_32-512.ico AirlockTools/AirlockTools_client.py --deployment --assume-yes-for-downloads
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
name: Build Library
|
||||||
|
run-name: ${{ gitea.actor }}
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- airlock_libs/**
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Build Library:
|
||||||
|
runs-on: debian-stable
|
||||||
|
steps:
|
||||||
|
- name: Install Prerequisites
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt install curl git python3 pip pkg-config openssl libssl-dev patchelf binutils-mingw-w64-x86-64 mingw-w64 -y
|
||||||
|
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||||
|
pip install maturin twine --break-system-packages
|
||||||
|
|
||||||
|
- name: Pull Repository
|
||||||
|
run: |
|
||||||
|
git clone https://brotoskyj:${{ secrets.RUNNER_TOKEN }}@git.racooncity.org/brotoskyj/AirlockTools --branch RustImplementation
|
||||||
|
|
||||||
|
- name: Compile Library and Upload
|
||||||
|
run: |
|
||||||
|
export TWINE_USERNAME=brotoskyj
|
||||||
|
export TWINE_PASSWORD=${{ secrets.RUNNER_TOKEN }}
|
||||||
|
export TWINE_REPOSITORY_URL=https://git.racooncity.org/api/packages/brotoskyj/pypi
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
rustup target add x86_64-pc-windows-gnu
|
||||||
|
cd AirlockTools/airlock_libs
|
||||||
|
cargo clean
|
||||||
|
cargo fmt
|
||||||
|
cargo clippy --fix --all-targets --allow-dirty
|
||||||
|
maturin build --target x86_64-unknown-linux-gnu -i python3.13 --release --strip
|
||||||
|
maturin build --target x86_64-pc-windows-gnu -i python3.13 --release --strip
|
||||||
|
python3 -m twine upload target/wheels/*
|
||||||
+3
-1
@@ -1,3 +1,6 @@
|
|||||||
|
*.toml
|
||||||
|
!airlock_libs/Cargo.toml
|
||||||
|
!airlock_libs/pyproject.toml
|
||||||
.env
|
.env
|
||||||
*.html
|
*.html
|
||||||
*.csv
|
*.csv
|
||||||
@@ -8,7 +11,6 @@ jobs.json
|
|||||||
*.xl*
|
*.xl*
|
||||||
*.exe
|
*.exe
|
||||||
securitytest.py
|
securitytest.py
|
||||||
*.toml
|
|
||||||
system_config.json
|
system_config.json
|
||||||
Development/
|
Development/
|
||||||
AirlockTools_client*/
|
AirlockTools_client*/
|
||||||
@@ -45,7 +45,7 @@ Python toolkit for secure, auditable, and automated airlock agent and policy man
|
|||||||
|
|
||||||
## 🧑💻 Requirements
|
## 🧑💻 Requirements
|
||||||
|
|
||||||
[airlock_libs](https://git.racooncity.org/brotoskyj/-/packages/pypi/airlock-libs/0.1.1)
|
[airlock_libs](https://git.racooncity.org/brotoskyj/-/packages/pypi/airlock-libs/)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
name: Build EXE and Release
|
||||||
|
run-name: ${{ gitea.actor }}
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- RustImplementation
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Build and Release:
|
||||||
|
runs-on: debian-stable
|
||||||
|
env:
|
||||||
|
DISPLAY: :99
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Prerequisites
|
||||||
|
run: |
|
||||||
|
dpkg --add-architecture i386
|
||||||
|
apt update > /dev/null 2>&1
|
||||||
|
apt install git curl wine32:i386 xvfb -y > /dev/null 2>&1
|
||||||
|
|
||||||
|
- name: Start X Virtual Framebuffer (Xvfb)
|
||||||
|
run: |
|
||||||
|
# Start Xvfb in the background using the defined display number
|
||||||
|
Xvfb :99 -screen 0 1024x768x16 &
|
||||||
|
|
||||||
|
- name: Cloning Repository
|
||||||
|
run: |
|
||||||
|
git clone https://brotoskyj:${{ secrets.RUNNER_TOKEN }}@git.racooncity.org/brotoskyj/build_test --branch RustImplementation
|
||||||
|
pwd
|
||||||
|
ls
|
||||||
|
|
||||||
|
- name: Setting Up Build Environment
|
||||||
|
run: |
|
||||||
|
apt install wine64 -y -qq > /dev/null 2>&1
|
||||||
|
curl -L -o python.exe https://www.python.org/ftp/python/3.13.9/python-3.13.9-amd64.exe
|
||||||
|
wine python.exe /quiet /NoWeb InstallAllUsers=1 PrependPath=1 TargetDir=C:/Python313
|
||||||
|
cp -r build_test/ ~/.wine/drive_c/Python313/
|
||||||
|
cd ~/.wine/drive_c/Python313
|
||||||
|
wine python.exe -m pip install nuitka pywin32 keyring --break-system-packages
|
||||||
|
wine python.exe -m pip install -r build_test/requirements.txt
|
||||||
|
wine python.exe -m pip install \
|
||||||
|
--index-url https://git.racooncity.org/api/packages/brotoskyj/pypi/simple/ \
|
||||||
|
airlock-libs --break-system-packages
|
||||||
|
|
||||||
|
- name: Build Executable
|
||||||
|
env:
|
||||||
|
DISPLAY: :99
|
||||||
|
WINEDEBUG: -all
|
||||||
|
run: |
|
||||||
|
xvfb-run -a wine cmd /c nuitka --onefile --onefile-windows-splash-screen-image=build_test/loading.png --follow-imports --include-module=keyring.backends.Windows --include-module=win32cred --include-module=pywintypes --include-module=pythoncom --include-module=win32api --include-module=win32security --include-module=win32con --windows-product-name='LoXide' --windows-product-version='1.2.10.0' --windows-company-name='WVUM IRT' --windows-icon-from-ico=build_test/IRT_icon_32-512.ico build_test/AirlockTools_client.py --deployment --assume-yes-for-downloads
|
||||||
Generated
+1
-1
@@ -17,7 +17,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "airlock_libs"
|
name = "airlock_libs"
|
||||||
version = "1.0.1"
|
version = "1.0.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"indicatif",
|
"indicatif",
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
[package]
|
||||||
|
name = "airlock_libs"
|
||||||
|
version = "1.0.3"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
chrono = "0.4.42"
|
||||||
|
indicatif = "0.18.2"
|
||||||
|
mongodb = "3.3.0"
|
||||||
|
pyo3 = { version = "0.27.0", features = ["extension-module", "generate-import-lib"] }
|
||||||
|
reqwest = { version = "0.12.24", features = ["json", "native-tls"] }
|
||||||
|
serde = "1.0.228"
|
||||||
|
serde-pyobject = "0.8.0"
|
||||||
|
serde_json = "1.0.145"
|
||||||
|
tokio = { version = "1.48.0", features = ["full"] }
|
||||||
|
|
||||||
|
[package.metadata.maturin]
|
||||||
|
generate-abi-stubs = true
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
opt-level = "z"
|
||||||
|
lto = "fat"
|
||||||
|
debug = false
|
||||||
|
codegen-units = 1
|
||||||
|
panic = 'abort'
|
||||||
|
strip = true
|
||||||
|
debug-assertions = false
|
||||||
|
overflow-checks = false
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["maturin1.9.6"]
|
||||||
|
build-backend = "maturin"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "airlock_libs"
|
||||||
|
version = "1.0.3"
|
||||||
|
description = "Airlock Digital API Wrapper"
|
||||||
|
readme = "README.md"
|
||||||
|
license = { text = "AGPL-3.0-only" }
|
||||||
|
authors = [{ name = "James Brotosky", email = "james.brotosky@racooncity.org" }]
|
||||||
|
|
||||||
|
[tool.maturin] # if you're building via maturin
|
||||||
|
bindings = "pyo3"
|
||||||
@@ -95,6 +95,7 @@ pub fn pull_policy_exec_histories(
|
|||||||
progress_bar.enable_steady_tick(std::time::Duration::from_millis(100));
|
progress_bar.enable_steady_tick(std::time::Duration::from_millis(100));
|
||||||
let client = build_client(py, &py_self);
|
let client = build_client(py, &py_self);
|
||||||
let api: Py<PyAny> = py_self;
|
let api: Py<PyAny> = py_self;
|
||||||
|
let cutoff = Local::now().naive_local() - Duration::days(days);
|
||||||
loop {
|
loop {
|
||||||
let execution_histories = history_logging(
|
let execution_histories = history_logging(
|
||||||
py,
|
py,
|
||||||
@@ -152,7 +153,6 @@ pub fn pull_policy_exec_histories(
|
|||||||
Ok(date) => date,
|
Ok(date) => date,
|
||||||
Err(_) => continue,
|
Err(_) => continue,
|
||||||
};
|
};
|
||||||
let cutoff = Local::now().naive_local() - Duration::days(days);
|
|
||||||
if history_date >= cutoff.into() {
|
if history_date >= cutoff.into() {
|
||||||
let key = (
|
let key = (
|
||||||
executions.sha256.clone(),
|
executions.sha256.clone(),
|
||||||
|
|||||||
@@ -9,3 +9,6 @@ schedule==1.2.2
|
|||||||
tqdm==4.67.1
|
tqdm==4.67.1
|
||||||
urllib3==2.5.0
|
urllib3==2.5.0
|
||||||
bson==0.5.10
|
bson==0.5.10
|
||||||
|
|
||||||
|
--extra-index-url https://git.racooncity.org/api/packages/brotoskyj/pypi/simple/
|
||||||
|
airlock_libs==1.0.3
|
||||||
Reference in New Issue
Block a user