Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
salt
gitlab-ci-templates
Commits
779fb2c4
Commit
779fb2c4
authored
May 14, 2019
by
Arif Ali
Browse files
Update to latest build scenrio, and use new extends feature
parent
81cc94b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
gitlab-ci-includes/build.yml
View file @
779fb2c4
.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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment