GithubHelp home page GithubHelp logo

asmagin / cake.sitecore Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 12.0 136 KB

The library provides a set of pre-build CAKE tasks. Those tasks could be used to simplify a configuration of CI/CD for Helix-based Sitecore projects.

Home Page: https://cakebuild.net/addins/sitecore/

License: MIT License

C# 44.75% HTML 0.22% PowerShell 55.02%
cakebuild cicd helix powershell sitecore

cake.sitecore's People

Contributors

artyom-krot avatar ashishagin avatar asmagin avatar dmborel avatar epam-contrib-bot avatar fpodshivadlov avatar outruller avatar tanatau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cake.sitecore's Issues

Recommended changes resulting from automated audit

We performed an automated audit of your Cake addin and found that it does not follow all the best practices.

We encourage you to make the following modifications:

  • Your addin should target netstandard2.0. Please note that there is no need to multi-target, netstandard2.0 is sufficient.

Apologies if this is already being worked on, or if there are existing open issues, this issue was created based on what is currently published for this package on NuGet.org and in the project on github.

Add cake-contrib user

First of all, I wanted to thank you for adding to the Cake community by adding this addin.

I was just wondering if you had seen this blog post:

http://cakebuild.net/blog/2016/08/cake-contribution-organization

We are currently going through a process of increasing the visibility of addins, and also trying to ensure their long term maintainability.

To that end, we are asking addin creators to add the cake-contrib user on NuGet as a co-owner (this can be done through the NuGet website by clicking on Manage Owners on the package page).

Would you be interested in doing this? If you have any questions about this, please let me know. There was some initial concern that the Cake Team were trying to "take over" packages, and that couldn't be further from the truth, and if you have this concern, or others, I would like to address them.

Thanks!

wrong definition of VERSION parameter in case of non-release branch

Issues:

  1. in the private static string GetVersion(string defaultValue) BuildID var is not defined.
  2. If we have non-release branch VERSION parameter will be defined as
    VERSION = 0.0.0-develop.
    From parameters.cake
if (!BranchName.IsRelease()) {
                return $"{version}-{Git.GetTagFromBranchName(BranchName)}.{BuildId}";
            }

That is wrong. Version should be in format 0.0.0 for any branch.

  1. It causes next issue with AssemblyVersion parameter, cause it defined as
    {VERSION}.0 and we will get 0.0.0-develop..0
    Build fails in case of non-release branch

Suggestions:
remove from parameters.cake
if (!BranchName.IsRelease()) {
return $"{version}-{Git.GetTagFromBranchName(BranchName)}.{BuildId}";
}

Deprecation warning for "mapCoverage" option when running unit tests

When running unit tests, a "Deprecation Warning" displays, saying that the Option "mapCoverage" has been removed, as it's no longer necessary. Please update your configuration. Please see the below snippet of the build output for more details:

========================================
Unit Tests :: Run Client Tests
========================================

> [email protected] test-cover C:\dev\PROJECTNAME\src
> jest --coverage --config ./scripts/jest/jest.config.js

● Deprecation Warning:

  Option "mapCoverage" has been removed, as it's no longer necessary.

  Please update your configuration.

  Configuration Documentation:
  https://facebook.github.io/jest/docs/configuration.html

 PASS  Project\Shared\client\client.index.test.ts
  PROJECTNAME Sample Test
    √ sample (3ms)

OpenCover Register option is not configurable

During running RunServerUnitTestsTask the following message shows:

No results, this could be for a number of reasons. The most common reasons are:
1) missing PDBs for the assemblies that match the filter please review the
output file and refer to the Usage guide (Usage.rtf) about filters. 2) the profiler may not be registered correctly, please refer to the Usage guide and the -register switch.

Changing it to _coverSettings.Register = "Path64" fixes the issue for me.

So my proposal is to allow to specify it from outside.

Unit test execution task returns lastexitcode=0 in case of failed unit test.

For now Unit test execution failure could be caught in MergeCoverageReportsTask.
if (Sitecore.Variables.UnitTestsFailed) { throw new Exception("One or more tests are failing"); }

If we do not run MergeCoverageReportsTask, but Unit tests failed in RunServerUnitTestsTask or in RunClientUnitTestsTask, we will not get failure at the end.

Parameter PUBLISHING_TARGET_DIR should be defined

  1. Parameter PUBLISHING_TARGET_DIR is not defined in the parameters.cake file.
  2. Also I see no where in scripts PUBLISHING_TARGET_DIR will be created. Suggestion: to add
    EnsureDirectoryExists(Sitecore.Parameters.PublishingTargetDir);
    to the tasks:
    .IsDependentOn(Sitecore.Tasks.CopyShipFilesTaskName)
    .IsDependentOn(Sitecore.Tasks.CopySpeRemotingFilesTaskName)
    .IsDependentOn(Sitecore.Tasks.PrepareWebConfigTaskName)
    .IsDependentOn(Sitecore.Tasks.PublishFoundationTaskName)
    .IsDependentOn(Sitecore.Tasks.PublishFeatureTaskName)
    .IsDependentOn(Sitecore.Tasks.PublishProjectTaskName)

OpenCover throwing errors during a build process

When running task Unit Tests :: Run Server Tests following error appears in logs.

Sources directory not set, will try to guess. This might not work properly when merging results from multiple test assemblies.

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: str
   at System.Text.RegularExpressions.Regex.Escape(String str)
   at Palmmedia.OpenCoverToCoberturaConverter.Converter.CreateRootElement(XDocument openCoverReport, String sourcesDirectory, Boolean includeGettersSetters)
   at Palmmedia.OpenCoverToCoberturaConverter.Converter.ConvertToCobertura(XDocument openCoverReport, String sourcesDirectory, Boolean includeGettersSetters)
   at Palmmedia.OpenCoverToCoberturaConverter.Program.Main(String[] args)

Rename to make clear it is not an addin

As this package contains scripts and tools and is not a Cake addin (e.g. doesn't provide any aliases), I would suggest to rename the package to Cake.Sitecore.Recipe, which is used by other similar packages (e.g. Cake.Recipe, Cake.Wyam.Recipe or Cake.Issues.Recipe). While naming packages like this is not technical necessary this convention adopted by the community helps people understand what the content of a package is.

Change function GetUnicornConfigPath

File parameters.cake
I can see wrong path in the function GetUnicornConfigPath in case of Release Build configuration.
Suggested solution:

  1. BuildConfiguration == "Release" instead of BuildConfiguration == "Debug"
    or
  2. swap paths

Add cake-recipe tag to Cake.Sitecore NuGet package

The NuGet Gallery will soon include a "Cake" tab with instructions on how to use NuGet packages in Cake build scripts. I'd like to suggest that you include the tag cake-recipe in the NuGet package of this recipe, so that the NuGet Gallery can display the correct instructions to install this recipe.

The tag cake-recipe is what nuget.org will use to determine if it's a recipe, and then display the tab with the #load directive.

The UI will look similar to this:

image


ps: It would be great if #48 could be done together with this one, so that the NuGet package starts following the naming convention for Recipes.

Use Cake Contrib Icon

Thanks again for creating this Cake Addin, we really appreciate the effort that you have put in to creating it.

We, the Cake Team, recently announced a new Cake Contrib Icon, details of which can be found here:

http://cakebuild.net/blog/2017/06/new-cake-contrib-icon

Would you consider changing the nuspec file for your NuGet Package to use this new Cake Contrib Icon? If so, the recommended URL to use is:

https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png

Details of the above URL can be found in the repository here:

https://github.com/cake-contrib/graphics

Please let me know if you have any questions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.