From e258c3c2d1b40494408138b2c9fd31ce47b7b451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Fri, 14 Jul 2017 20:37:03 +0100 Subject: .gitlab-ci.yml: Copy Sam's config to access the bst cache server --- .gitlab-ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba32d9ca..e9c386d2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,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 -- cgit v1.2.1