summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: c8eff0907e808d716f38268644e3343b65d7d04f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
image: samthursfield/buildstream:0.1-20170621.1

before_script:
  # Update to latest BuildStream
  - |
    cd ~/buildstream
    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"
  - export LC_ALL="C.UTF-8"

  # 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
  - |
    mkdir -p ~/.ssh
    echo $baserock_ostree_cache_private_key > ~/.ssh/id_rsa
    chmod 600 ~/.ssh/id_rsa
    cat > ~/.ssh/id_rsa.pub << EOF
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDbOQYG8xCjqv+1FptkXQLd6SwNam8zT/PsIQBa+Dgdu0z2Bbd96HUKqmWB/QJv5pp2HaDDIW6Q9bU5PCCu5gfmJhO0/fG7T6Wp0UMElMNxKQCE65gdrN7m3aMJkHwdj26JpRl0YsymgPggD+iQ8mGgNsEjTxuSyFRMYt82SB0fAhFvjIPEQOVqwoqnNj/TOnj3t8xwlSwhyuZXtt+v92KikS/kcNldsHulG6hde9AuK9o1+KfwFDbC6auLnJEO6mOC1FmQRsEROyG0I9gK5N/ngRc9RIRLWEQ9e3Dpgn8sjCGH8gXoskJvtg8MMcIEe1HA0II9IiFMtentHrxvhzasedveSf5IsKMveOcX0w8pB4jjFN+Fy/XP2zGskR9AYVGMMYf1aX5/z9haoK8+/gG5+At7SfP3QtPJdRG9CJxFYuQxbkgyyfzJCkfzf45XnZjdr3UR+yKP5t7zUlnlVEIDK5PvwDu0V5NxN0Irf0Q+SspG2lluBDgOw++xAaUTrGuS3rgAQ/Xlr2s3kesxF5bx1d7Xpv8XuGCiqzIK/2Wk5FGPXZ3iQjdb2FbKxvCO+9bDeEyzj4NG/rALRvj+4PbmSKpITf7VFJoUHd5VccGnugex0cusQXSIuUFwzvVrNAkHl5TcCRHWS+tbvqLPrLmI75fgw1MixfZTr7v8C6guQw==
    EOF
    # FIXME: we should be able to discover the public key by running this
    # command on the private key, and works locally for me with OpenSSH
    # 7.4p1-4 on Fedora but it fails on the runner with:
    #
    #   Enter passphrase: Load key "/root/.ssh/id_rsa": incorrect passphrase supplied to decrypt private key
    #
    # There is no passphrase so this is a weird issue.
    #
    # ssh-keygen -y -f ~/.ssh/id_rsa > ~/.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

build-build-system:
  stage: build
  script:
  - bst build --colors systems/build-system-content.bst