[grunt] remove .rej file check (#17805) (#17806)

The old backport tool we used, Jasper, would create PRs with .rej files
when it couldn't merge a backport cleanly. That lead to this task which
would skip the tests if .rej files were found. Now we don't use Jasper
and this check takes about 1 minute to run on CI, so we can remove it
and save some time.
This commit is contained in:
Spencer 2018-04-20 02:26:25 -07:00 committed by GitHub
parent 6a7c04737f
commit 383d590cb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 26 deletions

View file

@ -5,7 +5,6 @@ module.exports = function (grunt) {
// TODO: remove after migration to new CI is complete
grunt.registerTask('jenkins', compact([
'jenkins:env',
'rejectRejFiles',
'test',
process.env.JOB_NAME === 'kibana_core' ? 'build' : null
]));
@ -27,7 +26,6 @@ module.exports = function (grunt) {
grunt.registerTask('jenkins:unit', [
'jenkins:env',
'rejectRejFiles',
'run:eslint',
'licenses',
@ -44,7 +42,6 @@ module.exports = function (grunt) {
grunt.config.set('functional_test_runner.functional.options.configOverrides.mochaOpts.bail', true);
grunt.registerTask('jenkins:selenium', [
'jenkins:env',
'rejectRejFiles',
'test:uiRelease'
]);

View file

@ -1,23 +0,0 @@
// Fails if any .rej files are found
// .rej files are an artifact from a failed git-apply or a jasper backport
// This check is intentionally performed on the files in the repo rather than
// on the files that are to be committed.
export default grunt => {
grunt.registerTask('rejectRejFiles', 'Reject any git-apply .rej files', () => {
const files = grunt.file.expand([
'**/*.rej',
'!.es/**/*.rej',
'!plugins/**/*.rej',
'!optimize/**/*.rej',
'!**/node_modules/**/*.rej',
]);
if (files.length > 0) {
const err = `.rej files are not allowed:\n${files.join('\n')}`;
grunt.log.error(err);
return false;
}
});
};