Skip to content

Commit c9905a6

Browse files
utkarshgupta95CodeGat
authored andcommitted
added release_url to component build
1 parent 05cf79e commit c9905a6

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

tools/release_provenance/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class ComponentBuild(Base):
2626
spack_hash = Column(String, primary_key=True, index=True)
2727
spec = Column(String, nullable=False)
2828
install_path = Column(String, nullable=False, unique=True)
29+
release_url = Column(Text, nullable=False, unique=True)
2930
model_build = relationship('ModelBuild', secondary="model_component", back_populates='component_build')
3031

3132
class ModelStatusEnum(enum.Enum):

tools/release_provenance/save_release.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def get_component_build(component_build_data_list, model_build):
1919
component_build.install_path = component_build_data["install_path"]
2020
component_build.spack_hash = component_build_data["spack_hash"]
2121
component_build.spec = component_build_data["spec"]
22+
component_build.release_url = component_build_data["release_url"]
2223
component_build.model_build.append(model_build)
2324
component_build_list.append(component_build)
2425
else:

tools/release_provenance/test_release_data.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
{
44
"spack_hash": "ewcdbrfukblyjxpkhd3mfkj4yxfolal8",
55
"spec": "[email protected]=2023.11.09",
6-
"install_path": "/g/data/vk83/apps/spack/0.20/release/linux-rocky8-x86_64/intel-19.0.5.280/"
6+
"install_path": "/g/data/vk83/apps/spack/0.20/release/linux-rocky8-x86_64/intel-19.0.5.280/",
7+
"release_url": "https://github.com/ACCESS-NRI/mom5/releases"
78
},
89
{
910
"spack_hash": "ewcdbrfukblyjxpkhd3mfkj4yxfolal9",
1011
"spec": "[email protected]=2023.11.09",
11-
"install_path": "/g/data/vk83/apps/spack/0.20/release/linux-rocky8-x86_64/intel-19.1.5.283/"
12+
"install_path": "/g/data/vk83/apps/spack/0.20/release/linux-rocky8-x86_64/intel-19.1.5.283/",
13+
"release_url": "https://github.com/ACCESS-NRI/mom5-example/releases"
1214
}
1315
],
1416
"model_build": {

0 commit comments

Comments
 (0)