Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
03a7569e
Commit
03a7569e
authored
Jun 07, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rerun failed spinach tests
parent
498f8d13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
101 additions
and
73 deletions
+101
-73
.gitlab-ci.yml
.gitlab-ci.yml
+94
-70
scripts/prepare_build.sh
scripts/prepare_build.sh
+7
-3
No files found.
.gitlab-ci.yml
View file @
03a7569e
...
@@ -48,7 +48,7 @@ stages:
...
@@ -48,7 +48,7 @@ stages:
-
knapsack/
-
knapsack/
knapsack
:
knapsack
:
<<
:
*knapsack_state
<<
:
*
rspec-
knapsack_state
stage
:
prepare
stage
:
prepare
script
:
script
:
-
mkdir -p knapsack/
-
mkdir -p knapsack/
...
@@ -56,7 +56,7 @@ knapsack:
...
@@ -56,7 +56,7 @@ knapsack:
-
'
[[
-f
knapsack/spinach_report.json
]]
||
echo
"{}"
>
knapsack/spinach_report.json'
-
'
[[
-f
knapsack/spinach_report.json
]]
||
echo
"{}"
>
knapsack/spinach_report.json'
update-knapsack
:
update-knapsack
:
<<
:
*knapsack_state
<<
:
*
rspec-
knapsack_state
stage
:
post-test
stage
:
post-test
script
:
script
:
-
scripts/merge-reports knapsack/rspec_report.json knapsack/rspec_node_*.json
-
scripts/merge-reports knapsack/rspec_report.json knapsack/rspec_node_*.json
...
@@ -65,57 +65,73 @@ update-knapsack:
...
@@ -65,57 +65,73 @@ update-knapsack:
# Execute all testing suites
# Execute all testing suites
.knapsack
:
&knapsack
.
rspec-
knapsack
:
&knapsack
stage
:
test
stage
:
test
script
:
script
:
-
bundle exec rake assets:precompile 2>/dev/null
-
bundle exec rake assets:precompile 2>/dev/null
-
JOB_NAME=( $CI_BUILD_NAME )
-
JOB_NAME=( $CI_BUILD_NAME )
-
export CI_NODE_INDEX=${JOB_NAME[1]}
-
export CI_NODE_INDEX=${JOB_NAME[1]}
-
export CI_NODE_TOTAL=${JOB_NAME[2]}
-
export CI_NODE_TOTAL=${JOB_NAME[2]}
-
export KNAPSACK_REPORT_PATH=knapsack/
${JOB_NAME}
_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
-
export KNAPSACK_REPORT_PATH=knapsack/
rspec
_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
-
export KNAPSACK_GENERATE_REPORT=true
-
export KNAPSACK_GENERATE_REPORT=true
-
cp knapsack/
${JOB_NAME}
_report.json ${KNAPSACK_REPORT_PATH}
-
cp knapsack/
rspec
_report.json ${KNAPSACK_REPORT_PATH}
-
knapsack
${JOB_NAME[0]}
-
knapsack
rspec
artifacts
:
artifacts
:
paths
:
paths
:
-
knapsack/
-
knapsack/
rspec 0 20
:
*knapsack
.spinach-knapsack
:
&knapsack
rspec 1 20
:
*knapsack
stage
:
test
rspec 2 20
:
*knapsack
script
:
rspec 3 20
:
*knapsack
-
bundle exec rake assets:precompile 2>/dev/null
rspec 4 20
:
*knapsack
-
JOB_NAME=( $CI_BUILD_NAME )
rspec 5 20
:
*knapsack
-
export CI_NODE_INDEX=${JOB_NAME[1]}
rspec 6 20
:
*knapsack
-
export CI_NODE_TOTAL=${JOB_NAME[2]}
rspec 7 20
:
*knapsack
-
export KNAPSACK_REPORT_PATH=knapsack/spinach_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json
rspec 8 20
:
*knapsack
-
export KNAPSACK_GENERATE_REPORT=true
rspec 9 20
:
*knapsack
-
cp knapsack/spinach_report.json ${KNAPSACK_REPORT_PATH}
rspec 10 20
:
*knapsack
-
knapsack spinach[-r rerun]
rspec 11 20
:
*knapsack
# retry failed tests 3 times
rspec 12 20
:
*knapsack
-
retry '[ ! -e tmp/spinach-rerun.txt ] || bin/spinach -r rerun $(cat tmp/spinach-rerun.txt)'
rspec 13 20
:
*knapsack
artifacts
:
rspec 14 20
:
*knapsack
paths
:
rspec 15 20
:
*knapsack
-
knapsack/
rspec 16 20
:
*knapsack
rspec 17 20
:
*knapsack
rspec 0 20
:
*rspec-knapsack
rspec 18 20
:
*knapsack
rspec 1 20
:
*rspec-knapsack
rspec 19 20
:
*knapsack
rspec 2 20
:
*rspec-knapsack
rspec 3 20
:
*rspec-knapsack
spinach 0 10
:
*knapsack
rspec 4 20
:
*rspec-knapsack
spinach 1 10
:
*knapsack
rspec 5 20
:
*rspec-knapsack
spinach 2 10
:
*knapsack
rspec 6 20
:
*rspec-knapsack
spinach 3 10
:
*knapsack
rspec 7 20
:
*rspec-knapsack
spinach 4 10
:
*knapsack
rspec 8 20
:
*rspec-knapsack
spinach 5 10
:
*knapsack
rspec 9 20
:
*rspec-knapsack
spinach 6 10
:
*knapsack
rspec 10 20
:
*rspec-knapsack
spinach 7 10
:
*knapsack
rspec 11 20
:
*rspec-knapsack
spinach 8 10
:
*knapsack
rspec 12 20
:
*rspec-knapsack
spinach 9 10
:
*knapsack
rspec 13 20
:
*rspec-knapsack
rspec 14 20
:
*rspec-knapsack
rspec 15 20
:
*rspec-knapsack
rspec 16 20
:
*rspec-knapsack
rspec 17 20
:
*rspec-knapsack
rspec 18 20
:
*rspec-knapsack
rspec 19 20
:
*rspec-knapsack
spinach 0 10
:
*spinach-knapsack
spinach 1 10
:
*spinach-knapsack
spinach 2 10
:
*spinach-knapsack
spinach 3 10
:
*spinach-knapsack
spinach 4 10
:
*spinach-knapsack
spinach 5 10
:
*spinach-knapsack
spinach 6 10
:
*spinach-knapsack
spinach 7 10
:
*spinach-knapsack
spinach 8 10
:
*spinach-knapsack
spinach 9 10
:
*spinach-knapsack
# Execute all testing suites against Ruby 2.2
# Execute all testing suites against Ruby 2.2
.knapsack-ruby22
:
&knapsack-ruby22
.ruby-22
:
&ruby22
<<
:
*knapsack
image
:
"
ruby:2.2"
image
:
"
ruby:2.2"
only
:
only
:
-
master
-
master
...
@@ -124,37 +140,45 @@ spinach 9 10: *knapsack
...
@@ -124,37 +140,45 @@ spinach 9 10: *knapsack
paths
:
paths
:
-
vendor
-
vendor
rspec 0 20 ruby22
:
*knapsack-ruby22
.rspec-knapsack-ruby22
:
&rspec-knapsack-ruby22
rspec 1 20 ruby22
:
*knapsack-ruby22
<<
:
*rspec-knapsack
rspec 2 20 ruby22
:
*knapsack-ruby22
<<
:
*ruby-22
rspec 3 20 ruby22
:
*knapsack-ruby22
rspec 4 20 ruby22
:
*knapsack-ruby22
.spinach-knapsack-ruby22
:
&spinach-knapsack-ruby22
rspec 5 20 ruby22
:
*knapsack-ruby22
<<
:
*rspec-knapsack
rspec 6 20 ruby22
:
*knapsack-ruby22
<<
:
*ruby-22
rspec 7 20 ruby22
:
*knapsack-ruby22
rspec 8 20 ruby22
:
*knapsack-ruby22
rspec 0 20 ruby22
:
*rspec-knapsack-ruby22
rspec 9 20 ruby22
:
*knapsack-ruby22
rspec 1 20 ruby22
:
*rspec-knapsack-ruby22
rspec 10 20 ruby22
:
*knapsack-ruby22
rspec 2 20 ruby22
:
*rspec-knapsack-ruby22
rspec 11 20 ruby22
:
*knapsack-ruby22
rspec 3 20 ruby22
:
*rspec-knapsack-ruby22
rspec 12 20 ruby22
:
*knapsack-ruby22
rspec 4 20 ruby22
:
*rspec-knapsack-ruby22
rspec 13 20 ruby22
:
*knapsack-ruby22
rspec 5 20 ruby22
:
*rspec-knapsack-ruby22
rspec 14 20 ruby22
:
*knapsack-ruby22
rspec 6 20 ruby22
:
*rspec-knapsack-ruby22
rspec 15 20 ruby22
:
*knapsack-ruby22
rspec 7 20 ruby22
:
*rspec-knapsack-ruby22
rspec 16 20 ruby22
:
*knapsack-ruby22
rspec 8 20 ruby22
:
*rspec-knapsack-ruby22
rspec 17 20 ruby22
:
*knapsack-ruby22
rspec 9 20 ruby22
:
*rspec-knapsack-ruby22
rspec 18 20 ruby22
:
*knapsack-ruby22
rspec 10 20 ruby22
:
*rspec-knapsack-ruby22
rspec 19 20 ruby22
:
*knapsack-ruby22
rspec 11 20 ruby22
:
*rspec-knapsack-ruby22
rspec 12 20 ruby22
:
*rspec-knapsack-ruby22
spinach 0 10 ruby22
:
*knapsack-ruby22
rspec 13 20 ruby22
:
*rspec-knapsack-ruby22
spinach 1 10 ruby22
:
*knapsack-ruby22
rspec 14 20 ruby22
:
*rspec-knapsack-ruby22
spinach 2 10 ruby22
:
*knapsack-ruby22
rspec 15 20 ruby22
:
*rspec-knapsack-ruby22
spinach 3 10 ruby22
:
*knapsack-ruby22
rspec 16 20 ruby22
:
*rspec-knapsack-ruby22
spinach 4 10 ruby22
:
*knapsack-ruby22
rspec 17 20 ruby22
:
*rspec-knapsack-ruby22
spinach 5 10 ruby22
:
*knapsack-ruby22
rspec 18 20 ruby22
:
*rspec-knapsack-ruby22
spinach 6 10 ruby22
:
*knapsack-ruby22
rspec 19 20 ruby22
:
*rspec-knapsack-ruby22
spinach 7 10 ruby22
:
*knapsack-ruby22
spinach 8 10 ruby22
:
*knapsack-ruby22
spinach 0 10 ruby22
:
*spinach-knapsack-ruby22
spinach 9 10 ruby22
:
*knapsack-ruby22
spinach 1 10 ruby22
:
*spinach-knapsack-ruby22
spinach 2 10 ruby22
:
*spinach-knapsack-ruby22
spinach 3 10 ruby22
:
*spinach-knapsack-ruby22
spinach 4 10 ruby22
:
*spinach-knapsack-ruby22
spinach 5 10 ruby22
:
*spinach-knapsack-ruby22
spinach 6 10 ruby22
:
*spinach-knapsack-ruby22
spinach 7 10 ruby22
:
*spinach-knapsack-ruby22
spinach 8 10 ruby22
:
*spinach-knapsack-ruby22
spinach 9 10 ruby22
:
*spinach-knapsack-ruby22
# Other generic tests
# Other generic tests
...
...
scripts/prepare_build.sh
View file @
03a7569e
#!/bin/bash
#!/bin/bash
retry
()
{
retry
()
{
for
i
in
$(
seq
1 3
)
;
do
if
eval
"
$@
"
;
then
return
0
fi
for
i
in
2 1
;
do
sleep
3s
echo
"Retrying
$i
..."
if
eval
"
$@
"
;
then
if
eval
"
$@
"
;
then
return
0
return
0
fi
fi
sleep
3s
echo
"Retrying..."
done
done
return
1
return
1
}
}
...
...
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