From 1be45ca7233a153e50d5a67841a9177a0fd4d9c9 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 13 Jul 2017 17:55:56 +0000 Subject: .gitlab-ci.yml: Enable artifact cache integration This should allow the CI to populate the ostree.baserock.org artifact cache... --- .gitlab-ci.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4db6b216..e1c0054e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,18 +1,16 @@ image: samthursfield/buildstream:0.1-20170621.1 before_script: - # Needed until https://gitlab.com/BuildStream/buildstream/merge_requests/34 - # is merged. + # Update to latest BuildStream - cd ~/buildstream - - git remote add fork https://gitlab.com/samthursfield/buildstream - - git remote update fork - - git reset --hard fork/sam/host-and-target-arch + - git pull origin master - pip3 install . - cd - # Diagnostics - mount - df -h + - whoami # Work around https://github.com/fedora-cloud/docker-brew-fedora/issues/14 - export LANG="C.UTF-8" @@ -21,6 +19,19 @@ before_script: # Store cache in the shared Docker volume - export XDG_CACHE_HOME=/cache + # Private key stored as a protected variable that allows pushing to + # ostree@ostree.baserock.org + - echo $baserock_ostree_cache_private_key > ~/.ssh/id_rsa + - ssh-keygen ~/.ssh/id_rsa -y > ~/.ssh/id_rsa.pub + + # Enable push and pull for Baserock artifact cache + - cat > ~/.config/buildstream.conf <