Skip to main content

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
  • Project expects a BaselineConfig.plist to be provided, MDM Profiles are currently not supported

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

baseline_builder-1.0.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file baseline_builder-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for baseline_builder-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 791780409f5a8a80d280e4c01c74745e181c3b07361b307c99f87deae6ff83ed
MD5 e3d4cff5930f7aab6c4eb04a55970dd3
BLAKE2b-256 85dd3c3332828339a5a2950e30d7f76625c9a14ed06f8571535ed7de8be643c3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page