migrify/easy-ci

Tools that you use in any CI

Maintainers

Details

github.com/migrify/easy-ci

Source

Installs: 70 660

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

0.3.51 2020-10-25 12:24 UTC

README

Downloads total

Tools that make easy to setup CI.

Install

composer require migrify/easy-ci --dev

Usage

vendor/bin/easy-ci check-conflicts src config

Generate Sonar Cube config file sonar-project.properties

This command comes very handy, if you change, add or remove your paths to your PHP code. While not very common, it comes handy in monorepo or local packages. No need to update sonar-project.properties manually - this command automates it!

First, read how to enable Sonar Cube for your project.

Then create easy-ci.php with following values:

<?php

declare(strict_types=1);

use Migrify\EasyCI\ValueObject\Option;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
    $parameters = $containerConfigurator->parameters();

    $parameters->set(Option::SONAR_ORGANIZATION, 'migrify');
    $parameters->set(Option::SONAR_PROJECT_KEY, 'migrify_migrify');
    // paths to your source, packages and tests
    $parameters->set(Option::SONAR_DIRECTORIES, [
        __DIR__ . '/src',
        __DIR__ . '/tests',
        __DIR__ . '/packages',
    ]);
    
    // optional - for extra parameters
    $parameters->set(Option::SONAR_OTHER_PARAMETERS, [
        'sonar.extra' => 'extra_values',
    ]);
};

Last, generate the file:

vendor/bin/easy-ci generate-sonar

That's it!

Report Issues

In case you are experiencing a bug or want to request a new feature head over to the migrify monorepo issue tracker

Contribute

The sources of this package are contained in the migrify monorepo. We welcome contributions for this package on migrify/migrify.