Commit 779fb2c4 authored by Arif Ali's avatar Arif Ali
Browse files

Update to latest build scenrio, and use new extends feature

parent 81cc94b2
.build_options: &build_options
variables:
KITCHEN_GLOBAL_YAML: "kitchen/config.yml"
.build_options:
before_script:
- apk add ruby-dev ruby-bundler gcc libc-dev make wget
- bundle install
- '[[ $GITSHELF ]] || sudo pip install -r test-requirements.txt'
- '[[ $GITSHELF ]] || gitshelf install'
- '[[ ${GITSHELF} == \"true\" ]] || apk add py2-pip python2-dev git openssh'
- '[[ ${GITSHELF} == \"true\" ]] || pip install -r test-requirements.txt'
- '[[ ${GITSHELF} == \"true\" ]] || gitshelf install'
- mkdir kitchen
- wget https://gitlab.ocf.co.uk/salt/gitlab-ci-templates/raw/master/kitchen/config.yml -O kitchen/config.yml
after_script:
- kitchen destroy all
.test_os: &test_os
.test_os:
stage: test
script:
- JOB_NAME=( $CI_JOB_NAME )
- kitchen verify ${JOB_NAME[-1]}-${JOB_NAME[-3]}-${JOB_NAME[-2]}
<<: *build_options
- JOB_NAME=$CI_JOB_NAME
- OS=`echo $JOB_NAME | awk '{print $2}'`
- OS_VER=`echo $JOB_NAME | awk '{print $3}'`
- SALT_CODENAME=`echo $JOB_NAME | awk '{print $4}'`
- kitchen verify ${SALT_CODENAME}-${OS}-${OS_VER}
extends: .build_options
retry: 1
.test_os_develop: &test_os_develop
<<: *test_os
.test_os_develop:
extends: .test_os
allow_failure: True
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment