You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an optional git source checksum that is passed to BuildKit so tags and branches can be fetched by ref while ensuring they resolve to the expected commit.
This preserves .git tag metadata when keepGitDir is enabled, which lets tools derive version information from tags without giving up source pinning. If a tag or branch moves away from the expected commit, checksum verification fails the build.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Copy file name to clipboardExpand all lines: docs/spec.schema.json
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1820,22 +1820,33 @@
1820
1820
],
1821
1821
"properties": {
1822
1822
"auth": {
1823
-
"$ref": "#/$defs/GitAuth"
1823
+
"$ref": "#/$defs/GitAuth",
1824
+
"description": "Auth can be used to add instructions on how to authenticate with the git repository."
1825
+
},
1826
+
"checksum": {
1827
+
"type": [
1828
+
"string",
1829
+
"null"
1830
+
],
1831
+
"description": "Checksum is the expected commit hash for the resolved ref.\nIt is useful when \"Commit\" refers to a mutable ref, such as a tag."
1824
1832
},
1825
1833
"commit": {
1826
1834
"type": [
1827
1835
"string"
1828
-
]
1836
+
],
1837
+
"description": "Commit is the ref, which may be a commit, a tag, or even a full ref.\nNOTE: When using a commit ref, tag info is *not* fetched."
1829
1838
},
1830
1839
"keepGitDir": {
1831
1840
"type": [
1832
1841
"boolean"
1833
-
]
1842
+
],
1843
+
"description": "KeepGitDir includes the .git directory in the source.\nNOTE: Not all git metadata may be available. The available metadata depends\non the ref specified by \"Commit\"."
1834
1844
},
1835
1845
"url": {
1836
1846
"type": [
1837
1847
"string"
1838
-
]
1848
+
],
1849
+
"description": "URL is the URL of the git repository."
0 commit comments