diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-07-13 17:55:56 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-07-13 17:55:56 +0000 |
commit | 1be45ca7233a153e50d5a67841a9177a0fd4d9c9 (patch) | |
tree | f2cc2e163152674296d70b2efc0695d1b8b6da73 | |
parent | 5ade036da70807cd1c3d36391f315b96450da515 (diff) | |
download | definitions-1be45ca7233a153e50d5a67841a9177a0fd4d9c9.tar.gz |
.gitlab-ci.yml: Enable artifact cache integration
This should allow the CI to populate the ostree.baserock.org artifact
cache...
-rw-r--r-- | .gitlab-ci.yml | 21 |
1 files 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 <<EOF + artifacts: + pull-url: https://ostree.baserock.org/cache/ + push-url: ostree@ostree.baserock.org:cache + push-port: 22200 + EOF + stages: - build |