From: Bastian Blank Date: Fri, 9 Feb 2018 12:28:28 +0000 (+0100) Subject: Update octocatalog job X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=commitdiff_plain;h=9b594dc6d980baacd5a2cc74dc98334bdd6df434 Update octocatalog job --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 49a4eb3e2..4b3e9adb0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,14 +11,13 @@ - apt-get install -y cmake libldap-dev libsasl2-dev - bundle install --binstubs bin --with octocatalog - - git branch -f base $REF_BASE - - git branch -f test $CI_BUILD_REF - - - echo -n "$R10K" > r10k.yaml - - bundle exec r10k deploy environment --verbose debug base test + - echo -n "$FILE_R10K" > r10k.yaml + - git branch -f $ENV_BASE origin/$ENV_BASE + - git branch -f $ENV_TEST $CI_BUILD_REF + - bundle exec r10k deploy environment --puppetfile --verbose debug $ENV_BASE $ENV_TEST - spec/octocatalog/init-system - - spec/octocatalog/init-env base test - - spec/octocatalog/run-octocatalog base test + - spec/octocatalog/init-env + - spec/octocatalog/run-octocatalog test-octocatalog/master: <<: *test-octocatalog @@ -27,8 +26,9 @@ test-octocatalog/master: - master variables: - REF_BASE: origin/master - R10K: | + ENV_BASE: master + ENV_TEST: test_octocatalog + FILE_R10K: | cachedir: 'cache' sources: plain: diff --git a/spec/octocatalog/init-env b/spec/octocatalog/init-env index 9c71f3537..da0e36962 100755 --- a/spec/octocatalog/init-env +++ b/spec/octocatalog/init-env @@ -1,7 +1,7 @@ #!/bin/bash set -euE -for env in "$@"; do +for env in $ENV_BASE $ENV_TEST; do mkdir -p environments/$env/modules/nagios/files/dsa-nagios/generated/ touch environments/$env/modules/nagios/files/dsa-nagios/generated/nrpe_dsa.cfg diff --git a/spec/octocatalog/run-octocatalog b/spec/octocatalog/run-octocatalog index 2d0870489..abdddf2bf 100755 --- a/spec/octocatalog/run-octocatalog +++ b/spec/octocatalog/run-octocatalog @@ -1,9 +1,6 @@ #!/bin/bash set -euE -ENV_BASE=$1 -ENV_TEST=$2 - for fact in spec/octocatalog/facts/*; do hostname=$(basename $fact .json) bundle exec octocatalog-diff \