How to use the ci-info.JENKINS function in ci-info

To help you get started, we’ve selected a few ci-info examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gucong3000 / gulp-reporter / lib / ci-reporter.js View on Github external
if (result[error.fileName]) {
			result[error.fileName].push(error);
		} else {
			result[error.fileName] = [error];
		}
	});
	return result;
}

function reduceErrors (files) {
	return files.reduce((errors, file) => (
		errors.concat(file.report.errors)
	), []).filter(Boolean);
}

if (ci.isCI && (ci.APPVEYOR || ci.CIRCLE || ci.JENKINS)) {
	appveyorApiUrl = process.env.APPVEYOR_API_URL;
	if (appveyorApiUrl) {
		// eslint-disable-next-line node/no-deprecated-api
		appveyorApiUrl = url.resolve(appveyorApiUrl, 'api/build/compilationmessages');
	}
	module.exports = function (files) {
		const errors = reduceErrors(files);
		if (!errors.length) {
			return noop();
		}
		let result;
		if (appveyorApiUrl) {
			result = appveyor(errors);
		} else {
			const errorSet = getErrorsByFile(errors);
			if (ci.CIRCLE) {
github gucong3000 / gulp-reporter / lib / get-options.js View on Github external
function getOptions (file) {
		if (typeof options === 'function') {
			options = options(file);
		}
		options = Object.assign({
			maxLineLength: 512,
			browser: false,
			output: !(ci.isCI && (ci.APPVEYOR || ci.CIRCLE || (ci.JENKINS && hasCheckstyle))),
			blame: true,
			fail: true,
			sort: true,
		}, options);
		return Promise.resolve(options.blame && getAuthor(file.cwd)).then(author => {
			options = Object.assign({
				author,
			}, options);

			if (typeof options.author === 'string') {
				if (/@/.test(options.author)) {
					options.author = {
						email: options.author,
					};
				} else {
					options.author = {

ci-info

Get details about the current Continuous Integration environment

MIT
Latest version published 1 month ago

Package Health Score

86 / 100
Full package analysis