summaryrefslogtreecommitdiff
path: root/tests/cachekey
diff options
context:
space:
mode:
authorValentin David <valentin.david@codethink.co.uk>2018-10-26 16:38:53 +0200
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-12-05 18:47:52 +0900
commit8251310950e72f18c2d171de375051fb0e126655 (patch)
treef76c349c7c06825a0813ccb3cdc54861262db7e0 /tests/cachekey
parent5d77b871a343c8a196569ab17fd5e4f04bb6baec (diff)
downloadbuildstream-8251310950e72f18c2d171de375051fb0e126655.tar.gz
git source plugin: Track git tags and save them to reproduce a minimum shallow repository
Instead of tag information being fetched which can change with time, they are tracked and saved in the projects.refs/.bst. Then we re-tag automatically the closest tag so that `git describe` works and is reproducible. This new feature is opt-in with the new `track-tags` configuration, and must be used to fix modules which are broken by our new policy of omitting the `.git/` repository when staging git sources. This fixes issue #487
Diffstat (limited to 'tests/cachekey')
-rw-r--r--tests/cachekey/project/sources/git3.bst12
-rw-r--r--tests/cachekey/project/sources/git3.expected1
-rw-r--r--tests/cachekey/project/target.bst1
-rw-r--r--tests/cachekey/project/target.expected2
4 files changed, 15 insertions, 1 deletions
diff --git a/tests/cachekey/project/sources/git3.bst b/tests/cachekey/project/sources/git3.bst
new file mode 100644
index 000000000..b331a3af3
--- /dev/null
+++ b/tests/cachekey/project/sources/git3.bst
@@ -0,0 +1,12 @@
+kind: import
+sources:
+- kind: git
+ url: https://example.com/git/repo.git
+ ref: 6ac68af3e80b7b17c23a3c65233043550a7fa685
+ tags:
+ - tag: lightweight
+ commit: 0a3917d57477ee9afe7be49a0e8a76f56d176df1
+ annotated: false
+ - tag: annotated
+ commit: 68c7f0bd386684742c41ec2a54ce2325e3922f6c
+ annotated: true
diff --git a/tests/cachekey/project/sources/git3.expected b/tests/cachekey/project/sources/git3.expected
new file mode 100644
index 000000000..b383ccbfc
--- /dev/null
+++ b/tests/cachekey/project/sources/git3.expected
@@ -0,0 +1 @@
+6a25f539bd8629a36399c58efd2f5c9c117feb845076a37dc321b55d456932b6 \ No newline at end of file
diff --git a/tests/cachekey/project/target.bst b/tests/cachekey/project/target.bst
index d96645da8..8c5c12723 100644
--- a/tests/cachekey/project/target.bst
+++ b/tests/cachekey/project/target.bst
@@ -7,6 +7,7 @@ depends:
- sources/bzr1.bst
- sources/git1.bst
- sources/git2.bst
+- sources/git3.bst
- sources/local1.bst
- sources/local2.bst
- sources/ostree1.bst
diff --git a/tests/cachekey/project/target.expected b/tests/cachekey/project/target.expected
index 640133e23..0c89af6bb 100644
--- a/tests/cachekey/project/target.expected
+++ b/tests/cachekey/project/target.expected
@@ -1 +1 @@
-125d9e7dcf4f49e5f80d85b7f144b43ed43186064afc2e596e57f26cce679cf5 \ No newline at end of file
+bc99c288f855ac2619787f0067223f7812d2e10a9d2c7f2bf47de7113c0fd25c \ No newline at end of file