Skip to content

Commit 9f7813f

Browse files
support pinning vivarium_build_utils (#542)
1 parent 6aec362 commit 9f7813f

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
**1.2.3 - 05/06/25**
1+
**1.2.4 - 07/16/25**
2+
3+
- Support pinning of vivarium_build_utils; pin vivarium_build_utils>=1.1.0,<2.0.0
4+
5+
**1.2.3 - 05/06/25**
26

37
- request reusable pipeline to stagger scheduled builds
48

Jenkinsfile

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
/*This file uses jenkins shared library `vivarium_build_utils`,
2-
found at https://github.com/ihmeuw/vivarium_build_utils
3-
Due to Jenkins convention, importable modules must be stored
1+
/* This Jenkinsfile simply loads the `reusable_pipeline` pipeline from the
2+
vivariu_build_utils repository (https://github.com/ihmeuw/vivarium_build_utils).
3+
4+
vivarium_build_utils is loaded as a Jenkins shared library
5+
(https://www.jenkins.io/doc/book/pipeline/shared-libraries/).
6+
Jenkins shared library convention dictates that importable modules must be stored
47
in the 'vars' folder.
5-
Jenkins needs to be configured globally to use the correct branch.
6-
To configure the repo/branch go to:
8+
9+
Jenkins shared libraries can be configured in the Jenkins UI:
710
* Manage Jenkins
811
* Configure System
912
* Global Pipeline Libraries section
@@ -14,10 +17,16 @@ To configure the repo/branch go to:
1417
* Project Repository: Url to the shared lib
1518
* Credentials: SSH key to access the repo
1619
17-
Updating the shared repo will take affect on the next pipeline invocation.
18-
The "_" denotes that all modules will be imported from the shared library.
20+
Note that updating the shared repo will take affect on the next pipeline invocation.
1921
*/
20-
@Library("vivarium_build_utils") _
22+
23+
// Load the get_vbu_version function from vivarium_build_utils/bootstrap/
24+
// (the directory to load from is defined in the Jenkins shared library configuration)
25+
@Library("get_vbu_version@main") _
26+
27+
// Load the full vivarium_build_utils library at the expected version
28+
library("vivarium_build_utils@${get_vbu_version()}")
29+
2130
reusable_pipeline(
2231
scheduled_branches: [
2332
"main",

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ ifdef JENKINS_URL
33
# Files are already in workspace from shared library
44
MAKE_INCLUDES := .
55
else
6-
# For local dev, search in parent directory
7-
MAKE_INCLUDES := ../vivarium_build_utils/resources/makefiles
6+
# For local dev, use the installed vivarium_build_utils package
7+
MAKE_INCLUDES := $(shell python -c "from vivarium_build_utils.resources import get_makefiles_path; print(get_makefiles_path())")
88
endif
99

1010
PACKAGE_NAME = pseudopeople
1111

1212
# Include makefiles from vivarium_build_utils
1313
include $(MAKE_INCLUDES)/base.mk
1414
include $(MAKE_INCLUDES)/test.mk
15-

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
long_description = f.read()
4040

4141
install_requirements = [
42+
"vivarium_build_utils>=1.1.0,<2.0.0",
4243
"pandas",
4344
"numpy<2.0.0",
4445
"pyyaml>=5.1",

0 commit comments

Comments
 (0)