Module for generating Baseline packages for deployment
Project description
Baseline Builder
Python-based tooling for generating Baseline packages, for streamlining package building of multiple clients. Designed for easier CI/CD integration with Python 3.
Features implemented:
- Resolves local files such as scripts, packages and images to Baseline packaging
- Scans in same directory as invocation script
- Calculates MD5 for scripts and packages
- Determines Team ID for local packages
- Easy imports for chaining into larger CI/CD workflows
Logic
Baseline Builder works by taking configuration files for Baseline, and generating a package for deployment. If scripts, packages or images are declared in the file, Baseline Builder will attempt to resolve them and embed inside the package.
- See Baseline's documentation on how to configure: Baseline Wiki
- If an mobileconfig is provided as input, a resolved version will be written next to the package.
- As the mobileconfig method is meant to be used, no BaselineConfig.plist is embedded in the package.
Example configuration can be found in the Samples directory. Below is pulled from RIPEDA Engineering configuration:
<key>Packages</key>
<array>
<dict>
<key>DisplayName</key>
<string>Printer</string>
<key>PackagePath</key>
<string>Assets/Packages/Printer.pkg</string>
<key>Icon</key>
<string>Assets/Icons/Printer.png</string>
</dict>
</array>
The project will attempt to resolve the PackagePath
and Icon
keys through scanning the local directory:
Baseline Builder Directory:
- client.plist
- Assets:
- Packages:
- Printer.pkg
- Icons:
- Printer.png
Installation
pip3 install baseline-builder
Usage
import baseline
baseline_obj = baseline.BaselineBuilder(
configuration_file="ripeda.plist",
identifier="com.ripeda.baseline.engineering",
version="1.0.0",
output="RIPEDA Baseline.pkg"
)
if baseline_obj.build() is False:
print("Failed to build package")
return
print("Package built successfully")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file baseline_builder-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: baseline_builder-1.2.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db223eb870faf92e7861381168a597874fe4b7cba664197aa0d851450a267b7c |
|
MD5 | 1bc734a249d9efaebf899331744c0138 |
|
BLAKE2b-256 | 8c628d30aa5a5d21167bbbff123a35e9ddac90b7c70d2fbe1bf58a9747d03caf |