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-14 20:37:03 +0100 |
commit | e258c3c2d1b40494408138b2c9fd31ce47b7b451 (patch) | |
tree | 64ac10a9f0921d5383057c71b1ad8c1615cf3bc2 /.gitlab-ci.yml | |
parent | bebfee864b88565ae7828550aa887ccc99ff1ce5 (diff) | |
download | definitions-e258c3c2d1b40494408138b2c9fd31ce47b7b451.tar.gz |
.gitlab-ci.yml: Copy Sam's config to access the bst cache server
Diffstat (limited to '.gitlab-ci.yml')
-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 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 |