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
ca4f0850
Commit
ca4f0850
authored
Dec 03, 2021
by
Sanad Liaquat
Committed by
Ash McKenzie
Dec 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If an MR changes only e2e tests, run only those e2e tests
parent
5f03cce6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
.gitlab/ci/qa.gitlab-ci.yml
.gitlab/ci/qa.gitlab-ci.yml
+5
-0
scripts/trigger-build
scripts/trigger-build
+2
-1
tooling/bin/qa/check_if_qa_only_spec_changes
tooling/bin/qa/check_if_qa_only_spec_changes
+18
-0
No files found.
.gitlab/ci/qa.gitlab-ci.yml
View file @
ca4f0850
...
...
@@ -58,6 +58,9 @@ update-qa-cache:
-
tooling/bin/find_change_diffs ${CHANGES_DIFFS_DIR}
script
:
-
|
tooling/bin/qa/check_if_qa_only_spec_changes ${CHANGES_FILE} ${ONLY_QA_CHANGES_FILE}
[ -f $ONLY_QA_CHANGES_FILE ] && export QA_TESTS="`cat $ONLY_QA_CHANGES_FILE`"
echo "QA_TESTS: $QA_TESTS"
tooling/bin/qa/package_and_qa_check ${CHANGES_DIFFS_DIR} && exit_code=$?
if [ $exit_code -eq 0 ]; then
./scripts/trigger-build omnibus
...
...
@@ -80,9 +83,11 @@ update-qa-cache:
expire_in
:
7d
paths
:
-
${CHANGES_FILE}
-
${ONLY_QA_CHANGES_FILE}
-
${CHANGES_DIFFS_DIR}/*
variables
:
CHANGES_FILE
:
tmp/changed_files.txt
ONLY_QA_CHANGES_FILE
:
tmp/qa_only_changed_files.txt
CHANGES_DIFFS_DIR
:
tmp/diffs
.package-and-qa-ff-base
:
...
...
scripts/trigger-build
View file @
ca4f0850
...
...
@@ -155,7 +155,8 @@ module Trigger
'ee'
=>
Trigger
.
ee?
?
'true'
:
'false'
,
'QA_BRANCH'
=>
ENV
[
'QA_BRANCH'
]
||
'master'
,
'CACHE_UPDATE'
=>
ENV
[
'OMNIBUS_GITLAB_CACHE_UPDATE'
],
'GITLAB_QA_OPTIONS'
=>
ENV
[
'GITLAB_QA_OPTIONS'
]
'GITLAB_QA_OPTIONS'
=>
ENV
[
'GITLAB_QA_OPTIONS'
],
'QA_TESTS'
=>
ENV
[
'QA_TESTS'
]
}
end
end
...
...
tooling/bin/qa/check_if_qa_only_spec_changes
0 → 100755
View file @
ca4f0850
#!/usr/bin/env ruby
# frozen_string_literal: true
# This script assumes the first argument is a path to a file containing a list of changed files and the second argument
# is the path of a file where a list of end-to-end spec files with the leading 'qa/' trimmed will be written to if
# all the files are end-to-end test spec files.
abort
(
"ERROR: Please specify the file containing the list of changed files and a file where the qa only spec files will be written"
)
if
ARGV
.
size
!=
2
file_contents
=
File
.
read
(
ARGV
.
shift
).
split
(
' '
)
all_files_are_qa_specs
=
file_contents
.
all?
{
|
file_path
|
file_path
=~
%r{^qa
\/
qa
\/
specs
\/
features
\/
}
}
output_file
=
ARGV
.
shift
if
all_files_are_qa_specs
qa_spec_paths_trimmed
=
file_contents
.
map
{
|
path
|
path
.
sub
(
'qa/'
,
''
)
}
File
.
write
(
output_file
,
qa_spec_paths_trimmed
.
join
(
' '
))
end
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