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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
445de445
Commit
445de445
authored
Jan 30, 2018
by
Rémy Coutable
Committed by
Robert Speicher
Feb 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Knapsack for the EE-only RSpec jobs
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
8d7cc02a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
.gitlab-ci.yml
.gitlab-ci.yml
+15
-5
doc/development/ee_features.md
doc/development/ee_features.md
+2
-2
No files found.
.gitlab-ci.yml
View file @
445de445
...
...
@@ -36,6 +36,7 @@ variables:
# This hack is needed to make ES not that memory hungry
ES_JAVA_OPTS
:
"
-Xms256m
-Xmx256m"
ELASTIC_URL
:
"
http://elastic:changeme@docker.elastic.co-elasticsearch-elasticsearch:9200"
EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH
:
knapsack/${CI_PROJECT_NAME}/rspec_report-master-ee.json
before_script
:
-
bundle --version
...
...
@@ -142,10 +143,13 @@ stages:
<<
:
*rspec-metadata
stage
:
test
script
:
-
export NO_KNAPSACK=1
-
export CACHE_CLASSES=true
-
export KNAPSACK_TEST_FILE_PATTERN="ee/spec/**{,/*/**}/*_spec.rb" KNAPSACK_GENERATE_REPORT=true CACHE_CLASSES=true
-
JOB_NAME=( $CI_JOB_NAME )
-
export CI_NODE_INDEX=${JOB_NAME[-2]} CI_NODE_TOTAL=${JOB_NAME[-1]}
-
export KNAPSACK_REPORT_PATH=knapsack/${CI_PROJECT_NAME}/${JOB_NAME[0]}_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report-ee.json
-
cp ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} ${KNAPSACK_REPORT_PATH}
-
scripts/gitaly-test-spawn
-
bundle exec rspec --color --format documentation ee/spec/
-
knapsack rspec -Ispec --color --format documentation
.rspec-ee-pg
:
&rspec-ee-pg
<<
:
*rspec-metadata-ee
...
...
@@ -282,6 +286,8 @@ retrieve-tests-metadata:
-
mkdir -p rspec_flaky/
-
wget -O $FLAKY_RSPEC_SUITE_REPORT_PATH http://${TESTS_METADATA_S3_BUCKET}.s3.amazonaws.com/$FLAKY_RSPEC_SUITE_REPORT_PATH || rm $FLAKY_RSPEC_SUITE_REPORT_PATH
-
'
[[
-f
$FLAKY_RSPEC_SUITE_REPORT_PATH
]]
||
echo
"{}"
>
${FLAKY_RSPEC_SUITE_REPORT_PATH}'
-
wget -O $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH http://${TESTS_METADATA_S3_BUCKET}.s3.amazonaws.com/$EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH || rm $EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH
-
'
[[
-f
$EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH
]]
||
echo
"{}"
>
${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH}'
update-tests-metadata
:
<<
:
*tests-metadata-state
...
...
@@ -297,8 +303,10 @@ update-tests-metadata:
-
retry gem install fog-aws mime-types
-
scripts/merge-reports ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg_node_*.json
-
scripts/merge-reports ${KNAPSACK_SPINACH_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/spinach-pg_node_*.json
-
scripts/merge-reports ${EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg_node_*-ee.json
-
scripts/merge-reports ${FLAKY_RSPEC_SUITE_REPORT_PATH} rspec_flaky/all_*_*.json
-
'
[[
-z
${TESTS_METADATA_S3_BUCKET}
]]
||
scripts/sync-reports
put
$TESTS_METADATA_S3_BUCKET
$KNAPSACK_RSPEC_SUITE_REPORT_PATH
$KNAPSACK_SPINACH_SUITE_REPORT_PATH'
-
'
[[
-z
${TESTS_METADATA_S3_BUCKET}
]]
||
scripts/sync-reports
put
$TESTS_METADATA_S3_BUCKET
$EE_KNAPSACK_RSPEC_SUITE_REPORT_PATH'
-
'
[[
-z
${TESTS_METADATA_S3_BUCKET}
]]
||
scripts/sync-reports
put
$TESTS_METADATA_S3_BUCKET
$FLAKY_RSPEC_SUITE_REPORT_PATH'
-
rm -f knapsack/${CI_PROJECT_NAME}/*_node_*.json
-
rm -f rspec_flaky/all_*.json rspec_flaky/new_*.json
...
...
@@ -364,8 +372,10 @@ setup-test-env:
-
config/secrets.yml
# EE jobs
rspec-pg ee
:
*rspec-ee-pg
rspec-mysql ee
:
*rspec-ee-mysql
rspec-pg-ee 0 2
:
*rspec-ee-pg
rspec-pg-ee 1 2
:
*rspec-ee-pg
rspec-mysql-ee 0 2
:
*rspec-ee-mysql
rspec-mysql-ee 1 2
:
*rspec-ee-mysql
rspec-pg geo
:
*rspec-metadata-pg-geo
## EE jobs
...
...
doc/development/ee_features.md
View file @
445de445
...
...
@@ -28,8 +28,8 @@ we still need to merge changes from GitLab CE to EE. To help us get there,
we should make sure that we no longer edit CE files in place in order to
implement EE features.
Instead, all EE codes should be put inside the
`ee/`
top-level directory
, and
tests should be put inside
`ee/spec/`
. The
rest of codes should be as close as to the CE files.
Instead, all EE codes should be put inside the
`ee/`
top-level directory
. The
rest of codes should be as close as to the CE files.
[
single code base
]:
https://gitlab.com/gitlab-org/gitlab-ee/issues/2952#note_41016454
...
...
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