Skip to main content

Shared build utilities and Jenkins pipeline library for Simulation Science projects.

Project description

NOTE: This repository has been archived.

The vivarium_build_utils package has been migrated into the vivarium-suite monorepo.

What changed

  • Import path: vivarium_build_utils -> vivarium.build_utils

  • Source: ihmeuw/vivarium_build_utils (archived) -> ihmeuw/vivarium-suite (under libs/build-utils/)

To migrate fully to the new package

Install:

pip install vivarium-build-utils  # no change here

Import:

import vivarium.build_utils  # was: import vivarium_build_utils

Original package overview

Vivarium Build Utils contains shared build utilities for Simulation Science projects.

You can install vivarium_build_utils from PyPI with pip:

$ pip install vivarium_build_utils

or build it from source with:

$ git clone https://github.com/ihmeuw/vivarium_build_utils.git
$ cd vivarium_build_utils
$ conda create -n ENVIRONMENT_NAME
$ pip install -e .

Overview

This repository provides:

  • `vars/`: Jenkins shared library functions for continuous integration pipelines

  • `resources/`: Shared Makefiles and build scripts for consistent build processes

Note: for help with the Make targets available to any environment with this repository installed, run make help in the terminal.

Monorepo support

vivarium_build_utils supports both standalone repos and monorepos where many packages live under libs/<pkg>/. Standalone repos keep working with no changes; the sections below describe what’s needed for a monorepo.

Top-level Jenkinsfile (provisioner)

The monorepo’s root Jenkinsfile calls monorepo() to provision a Multibranch Pipeline for each per-package Jenkinsfile. Run this on the default branch only:

@Library('vivarium_build_utils') _

monorepo(
    jenkinsfiles: [
        'libs/core/Jenkinsfile',
        'libs/public-health/Jenkinsfile',
    ],
    // Jenkins credential ID for the GitHub App. Required, no default; vbu
    // stays org-agnostic so the literal UUID lives next to the org context.
    githubCredentialsId: 'fad62062-b1f4-447b-997f-005d6b1ea41e',
    folderPrefix: 'Public',  // optional, defaults to "Public"
)

The provisioned pipelines land under <folderPrefix>/<repo>/libs/<pkg>/.

Per-package Jenkinsfile

Each libs/<pkg>/Jenkinsfile calls reusable_pipeline() the same way a standalone repo would, with one new argument:

@Library('vivarium_build_utils') _

reusable_pipeline(
    test_types: ['unit', 'integration'],
    deployable: true,
    env_reqs: 'ci_jenkins',  // pyproject.toml extra to install
)

env_reqs selects which [project.optional-dependencies] extra make install pulls in. Omit it (or leave empty) on standalone repos to keep base.mk’s default of dev.

Deployable callers (deployable: true) can also pass github_credentials_id: '<jenkins-credential-id>' to override the git credential used at deploy time for pushing the release tag. When omitted, the deploy stage falls back to the credential configured on the Multibranch Pipeline’s branch source, which is the right default for most repos.

Tag prefix

The TAG_PREFIX environment variable controls both make tag-version and make validate-tag. It must be set consistently in both targets, or validate-tag will silently look at the wrong set of tags.

  • Standalone repos: leave unset. Tags are v<X.Y.Z>.

  • Monorepo libs: set TAG_PREFIX=vivarium-<lib>- (e.g. vivarium-core-). Tags become vivarium-<lib>-v<X.Y.Z>.

Release workflows that invoke make validate-tag or make tag-version should export TAG_PREFIX before running them.

Fetching from internal Artifactory

IHME_PYPI defaults to the internal Artifactory URL and is woven into EXTRA_INDEX_FLAGS for make install. Override it to empty (make install IHME_PYPI=) in environments that can’t reach IHME’s network (e.g. GitHub Actions runners). make deploy-package-artifactory requires a non-empty IHME_PYPI and is Jenkins/internal-only.

Project details


Download files

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

Source Distribution

vivarium_build_utils-3.3.3.tar.gz (49.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vivarium_build_utils-3.3.3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file vivarium_build_utils-3.3.3.tar.gz.

File metadata

  • Download URL: vivarium_build_utils-3.3.3.tar.gz
  • Upload date:
  • Size: 49.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vivarium_build_utils-3.3.3.tar.gz
Algorithm Hash digest
SHA256 8020701f3f0f1554bb082c1ada00a6e52e44ac84cc295793138c71e4cf42e834
MD5 e87ae9a1d4f6d36d1f1392098248ebf9
BLAKE2b-256 ee0281dd25234f289040cf54d0531019cdf14a633d2e85a9b9440792ecc65a9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for vivarium_build_utils-3.3.3.tar.gz:

Publisher: deploy.yml on ihmeuw/vivarium_build_utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vivarium_build_utils-3.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for vivarium_build_utils-3.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 987bb21252d306e3312b78e3d5f0917d1d9737a187b44b79a7aa36b5f1f73377
MD5 215c2420ce62de47b1693978f38e9dd7
BLAKE2b-256 19924b1c700f200aa7ed6ce1c53bc92b3bbaffee30abe9aa0b2ef637af145107

See more details on using hashes here.

Provenance

The following attestation bundles were made for vivarium_build_utils-3.3.3-py3-none-any.whl:

Publisher: deploy.yml on ihmeuw/vivarium_build_utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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