Init puppet environment with some stuff
[mirror/dsa-puppet.git] / .gitlab-ci.yml
1 .test-octocatalog: &test-octocatalog
2   image: ruby:2.3
3
4   script:
5     - unset BUNDLER_VERSION BUNDLE_APP_CONFIG BUNDLE_BIN BUNDLE_PATH GEM_HOME
6
7     - git config --global user.name "Your Name"
8     - git config --global user.email "you@example.com"
9
10     - apt-get update
11     - apt-get install -y cmake libldap-dev libsasl2-dev
12     - bundle install --binstubs bin --with octocatalog
13
14     - git branch -f base $REF_BASE
15     - git branch -f test $CI_BUILD_REF
16
17     - echo -n "$R10K" > r10k.yaml
18     - bundle exec r10k deploy environment --verbose debug base test
19     - spec/octocatalog/init-system
20     - spec/octocatalog/init-env base test
21     - spec/octocatalog/run-octocatalog base test
22
23 test-octocatalog/master:
24   <<: *test-octocatalog
25
26   except:
27     - master
28
29   variables:
30     REF_BASE: origin/master
31     R10K: |
32       cachedir: 'cache'
33       sources:
34         plain:
35           remote: '$CI_PROJECT_DIR'
36           basedir: 'environments'