diff options
author | Javier Jardón <jjardon@gnome.org> | 2017-07-14 20:37:03 +0100 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2017-07-25 23:17:42 +0100 |
commit | 43ac0c931ab335a99f5f2fef585c21d289c4482a (patch) | |
tree | 7addad87ba41d25e3624c02e05fcacbcc67e5907 | |
parent | f45e9f5aaea6842fd2322cbf4afdcf3ffd4f3223 (diff) | |
download | definitions-43ac0c931ab335a99f5f2fef585c21d289c4482a.tar.gz |
.gitlab-ci.yml: Copy Sam's config to access the bst cache server
-rw-r--r-- | .gitlab-ci.yml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a914fa7a..85e14c38 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,6 +28,29 @@ before_script: - dnf install -y bubblewrap ostree python3 python3-pip python3-gobject python3-devel - git clone https://gitlab.com/buildstream/buildstream - python3 -m pip install buildstream/ + # Private key stored as a protected variable that allows pushing to + # ostree@ostree.baserock.org + - | + if [ -z "$baserock_ostree_cache_private_key" ]; then + echo >&2 "Private key for ostree.baserock.org is not available." + exit 1 + fi + mkdir -p ~/.ssh + echo "$baserock_ostree_cache_private_key" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub + + # Trust the host key of the cache server. + - ssh-keyscan -p 22200 ostree.baserock.org >> ~/.ssh/known_hosts + + # Enable push and pull for Baserock artifact cache + - | + mkdir -p ~/.config + echo "artifacts:" > ~/.config/buildstream.conf + echo " pull-url: https://ostree.baserock.org/cache/" >> ~/.config/buildstream.conf + echo " push-url: ostree@ostree.baserock.org:cache" >> ~/.config/buildstream.conf + echo " push-port: 22200" >> ~/.config/buildstream.conf + cat ~/.config/buildstream.conf migrate-bst: stage: validate |