summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-11-09 12:37:42 (GMT)
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-11-10 12:39:51 (GMT)
commitb9f2e66a1bdb60c64a974bd8292dc339a1ef6e18 (patch)
treec24c67c6b00615a03e2dbee25a8e045f342f3998
parent4dc5443f2bf27cee18f09fa303244ee10a4fe17b (diff)
downloaddefinitions-b9f2e66a1bdb60c64a974bd8292dc339a1ef6e18.tar.gz
Actually use specific versions of YBD and BuildStreamsam/ci-fix
The approach from commit 56885a36e5c3830a6c6c7a663730a8a297a5825c was neater, but it doesn't work due to this GitLab issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/20615 I can't see any way to make this work apart from putting the SHA1s into the job before_script sections directly. I moved them upwards to make it more obvious. Of course once we stop using YBD we can clean this up nicely.
-rw-r--r--.gitlab-ci.yml40
1 files changed, 21 insertions, 19 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dfb22fb..2ef4ad1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,44 +9,31 @@ variables:
XDG_CACHE_HOME: "${CI_PROJECT_DIR}/.cache"
YBD_base: "/cache/ybd_base"
YBD_gits: "${CI_PROJECT_DIR}/.cache/ybd_base/gits"
- YBD_SHA: '157986cb2f7c0b95e0e4e0bf3a39547f548a298d'
- SPEC_SHA: '715023f3cf6e714839fb56236ade20de40855bd4'
- BST_SHA: 'b14a0c575991f3b75aa15b21b2652186b62d0a09'
DEFS2BST_SHA: '1dc5c0719de9357470b29ad4adc9b63f7012db86'
GET_SOURCES_ATTEMPTS: 3
-# Store all the downloaded git and ostree repos in the distributed cache.
-# This saves us fetching them from git.baserock.org and further afield
-# on every build.
-.ybd_cache: &ybd_cache
- cache:
- # GitLab defined default key is "default". Reuse this for ybd.
- key: default
- paths:
- - "${YBD_gits}/"
-.bst_cache: &bst_cache
- cache:
- key: bst
- paths:
- - "${XDG_CACHE_HOME}/buildstream/sources/"
-
.ybd_before_script: &ybd_before_script
before_script:
# Install and configure YBD
- |
+ export SPEC_SHA='715023f3cf6e714839fb56236ade20de40855bd4'
+ export YBD_SHA='157986cb2f7c0b95e0e4e0bf3a39547f548a298d'
export LC_ALL="C.UTF-8"
git clone https://gitlab.com/baserock/spec.git
+ # Use specific version of spec.git
git -C spec checkout $SPEC_SHA
git clone https://gitlab.com/baserock/ybd.git
+ # Use specific version of ybd.git
git -C ybd checkout $YBD_SHA
cd ybd && ./install_dependencies.sh && cd ..
pip install -r spec/requirements.txt
.bst_before_script: &bst_before_script
before_script:
- # Use specific version of BuildStream
- |
+ export BST_SHA='b14a0c575991f3b75aa15b21b2652186b62d0a09'
git clone https://gitlab.com/BuildStream/buildstream.git
+ # Use specific version of BuildStream
cd buildstream && git checkout $BST_SHA
pip3 install .
cd -
@@ -84,6 +71,21 @@ variables:
# Nuke ybd cache to ensure buildstream tasks have enough disk space.
- rm -rf "${YBD_base}"
+# Store all the downloaded git and ostree repos in the distributed cache.
+# This saves us fetching them from git.baserock.org and further afield
+# on every build.
+.ybd_cache: &ybd_cache
+ cache:
+ # GitLab defined default key is "default". Reuse this for ybd.
+ key: default
+ paths:
+ - "${YBD_gits}/"
+.bst_cache: &bst_cache
+ cache:
+ key: bst
+ paths:
+ - "${XDG_CACHE_HOME}/buildstream/sources/"
+
stages:
- preprocess
- build-1