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
ff8bb931
Commit
ff8bb931
authored
Sep 28, 2021
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci: Deduplicate frontend_fixture jobs for EE/FOSS
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
6baf8b3e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
37 deletions
+21
-37
.gitlab/ci/frontend.gitlab-ci.yml
.gitlab/ci/frontend.gitlab-ci.yml
+8
-20
.gitlab/ci/rules.gitlab-ci.yml
.gitlab/ci/rules.gitlab-ci.yml
+0
-7
.gitlab/ci/test-metadata.gitlab-ci.yml
.gitlab/ci/test-metadata.gitlab-ci.yml
+1
-2
doc/development/pipelines.md
doc/development/pipelines.md
+4
-4
scripts/rspec_helpers.sh
scripts/rspec_helpers.sh
+8
-4
No files found.
.gitlab/ci/frontend.gitlab-ci.yml
View file @
ff8bb931
...
...
@@ -130,11 +130,13 @@ update-storybook-yarn-cache:
-
tmp/tests/frontend/
-
knapsack/
rspec frontend_fixture
:
# In gitlab-foss, generates FOSS fixtures. In gitlab, generates FOSS & EE fixtures.
# That way, we don't need to have two separate jobs.
rspec-all frontend_fixture
:
extends
:
-
.frontend-fixtures-base
-
.frontend:rules:default-frontend-jobs
parallel
:
2
parallel
:
5
rspec frontend_fixture as-if-foss
:
extends
:
...
...
@@ -142,12 +144,6 @@ rspec frontend_fixture as-if-foss:
-
.frontend:rules:default-frontend-jobs-as-if-foss
-
.as-if-foss
rspec-ee frontend_fixture
:
extends
:
-
.frontend-fixtures-base
-
.frontend:rules:default-frontend-jobs-ee
parallel
:
3
graphql-schema-dump
:
variables
:
SETUP_DB
:
"
false"
...
...
@@ -198,9 +194,7 @@ jest:
-
.frontend:rules:jest
needs
:
-
job
:
"
detect-tests"
-
job
:
"
rspec
frontend_fixture"
-
job
:
"
rspec-ee
frontend_fixture"
optional
:
true
-
job
:
"
rspec-all
frontend_fixture"
artifacts
:
name
:
coverage-frontend
expire_in
:
31d
...
...
@@ -227,9 +221,7 @@ jest-integration:
script
:
-
run_timed_command "yarn jest:integration --ci"
needs
:
-
job
:
"
rspec
frontend_fixture"
-
job
:
"
rspec-ee
frontend_fixture"
optional
:
true
-
job
:
"
rspec-all
frontend_fixture"
-
job
:
"
graphql-schema-dump"
jest-as-if-foss
:
...
...
@@ -343,9 +335,7 @@ startup-css-check:
-
.frontend:rules:default-frontend-jobs
needs
:
-
job
:
"
compile-test-assets"
-
job
:
"
rspec
frontend_fixture"
-
job
:
"
rspec-ee
frontend_fixture"
optional
:
true
-
job
:
"
rspec-all
frontend_fixture"
startup-css-check as-if-foss
:
extends
:
...
...
@@ -369,9 +359,7 @@ compile-storybook:
-
.compile-storybook-base
-
.frontend:rules:default-frontend-jobs
needs
:
-
job
:
"
rspec
frontend_fixture"
-
job
:
"
rspec-ee
frontend_fixture"
optional
:
true
-
job
:
"
rspec-all
frontend_fixture"
-
job
:
"
graphql-schema-dump"
artifacts
:
name
:
storybook
...
...
.gitlab/ci/rules.gitlab-ci.yml
View file @
ff8bb931
...
...
@@ -495,13 +495,6 @@
-
<<
:
*if-default-refs
changes
:
*code-backstage-patterns
.frontend:rules:default-frontend-jobs-ee:
rules
:
-
<<
:
*if-not-ee
when
:
never
-
<<
:
*if-default-refs
changes
:
*code-backstage-patterns
.frontend:rules:default-frontend-jobs-as-if-foss:
rules
:
-
<<
:
*if-not-ee
...
...
.gitlab/ci/test-metadata.gitlab-ci.yml
View file @
ff8bb931
...
...
@@ -29,8 +29,7 @@ update-tests-metadata:
-
retrieve-tests-metadata
-
setup-test-env
-
rspec migration pg12
-
rspec frontend_fixture
-
rspec-ee frontend_fixture
-
rspec-all frontend_fixture
-
rspec unit pg12
-
rspec integration pg12
-
rspec system pg12
...
...
doc/development/pipelines.md
View file @
ff8bb931
...
...
@@ -252,7 +252,7 @@ graph RL;
2_1-1 & 2_1-2 & 2_1-3 & 2_1-4 --> 1-6;
end
2_2-2["rspec
frontend_fixture/rspec-ee
frontend_fixture (7 minutes)"];
2_2-2["rspec
-all
frontend_fixture (7 minutes)"];
class 2_2-2 criticalPath;
click 2_2-2 "https://app.periscopedata.com/app/gitlab/652085/Engineering-Productivity---Pipeline-Build-Durations?widget=7910143&udv=0"
2_2-4["memory-on-boot (3.5 minutes)"];
...
...
@@ -284,7 +284,7 @@ graph RL;
3_1-1["jest (14.5 minutes)"];
class 3_1-1 criticalPath;
click 3_1-1 "https://app.periscopedata.com/app/gitlab/652085/Engineering-Productivity---Pipeline-Build-Durations?widget=6914204&udv=0"
subgraph "Needs `rspec
frontend_fixture/rspec-ee
frontend_fixture`";
subgraph "Needs `rspec
-all
frontend_fixture`";
3_1-1 --> 2_2-2;
end
...
...
@@ -355,7 +355,7 @@ graph RL;
2_1-1 & 2_1-2 & 2_1-3 & 2_1-4 --> 1-6;
end
2_2-2["rspec
frontend_fixture/rspec-ee
frontend_fixture (7 minutes)"];
2_2-2["rspec
-all
frontend_fixture (7 minutes)"];
class 2_2-2 criticalPath;
click 2_2-2 "https://app.periscopedata.com/app/gitlab/652085/Engineering-Productivity---Pipeline-Build-Durations?widget=7910143&udv=0"
2_2-4["memory-on-boot (3.5 minutes)"];
...
...
@@ -395,7 +395,7 @@ graph RL;
3_1-1["jest (14.5 minutes)"];
class 3_1-1 criticalPath;
click 3_1-1 "https://app.periscopedata.com/app/gitlab/652085/Engineering-Productivity---Pipeline-Build-Durations?widget=6914204&udv=0"
subgraph "Needs `rspec
frontend_fixture/rspec-ee
frontend_fixture`";
subgraph "Needs `rspec
-all
frontend_fixture`";
3_1-1 --> 2_2-2;
end
...
...
scripts/rspec_helpers.sh
View file @
ff8bb931
...
...
@@ -109,14 +109,18 @@ function rspec_paralellized_job() {
local
test_level
=
"
${
job_name
[1]
}
"
local
report_name
=
$(
echo
"
${
CI_JOB_NAME
}
"
|
sed
-E
's|[/ ]|_|g'
)
# e.g. 'rspec unit pg12 1/24' would become 'rspec_unit_pg12_1_24'
local
rspec_opts
=
"
${
1
}
"
local
spec_folder_prefix
=
""
local
spec_folder_prefix
es
=
""
if
[[
"
${
test_tool
}
"
=
~
"-ee"
]]
;
then
spec_folder_prefix
=
"ee/
"
spec_folder_prefix
es
=
"'ee/'
"
fi
if
[[
"
${
test_tool
}
"
=
~
"-jh"
]]
;
then
spec_folder_prefix
=
"jh/"
spec_folder_prefixes
=
"'jh/'"
fi
if
[[
"
${
test_tool
}
"
=
~
"-all"
]]
;
then
spec_folder_prefixes
=
"['', 'ee/']"
fi
export
KNAPSACK_LOG_LEVEL
=
"debug"
...
...
@@ -131,7 +135,7 @@ function rspec_paralellized_job() {
cp
"
${
KNAPSACK_RSPEC_SUITE_REPORT_PATH
}
"
"
${
KNAPSACK_REPORT_PATH
}
"
if
[[
-z
"
${
KNAPSACK_TEST_FILE_PATTERN
}
"
]]
;
then
pattern
=
$(
ruby
-r
./tooling/quality/test_level.rb
-e
"puts Quality::TestLevel.new(
%(
${
spec_folder_prefix
}
)
).pattern(:
${
test_level
}
)"
)
pattern
=
$(
ruby
-r
./tooling/quality/test_level.rb
-e
"puts Quality::TestLevel.new(
${
spec_folder_prefixes
}
).pattern(:
${
test_level
}
)"
)
export
KNAPSACK_TEST_FILE_PATTERN
=
"
${
pattern
}
"
fi
...
...
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