Update octocatalog job
authorBastian Blank <bastian.blank@credativ.de>
Fri, 9 Feb 2018 12:28:28 +0000 (13:28 +0100)
committerBastian Blank <bastian.blank@credativ.de>
Fri, 9 Feb 2018 12:39:38 +0000 (13:39 +0100)
.gitlab-ci.yml
spec/octocatalog/init-env
spec/octocatalog/run-octocatalog

index 49a4eb3..4b3e9ad 100644 (file)
     - 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:
index 9c71f35..da0e369 100755 (executable)
@@ -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
 
index 2d08704..abdddf2 100755 (executable)
@@ -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 \