Giter Club home page Giter Club logo

Comments (2)

majorku5anagi avatar majorku5anagi commented on May 30, 2024

Hi @BernieWhite I believe that locally, I can tamper with Baseline.Rule.yaml, CAF.Common.Rule.ps1, CAF.Name.Rule.ps1, CAF.Tag.Rule.ps1, Config.Rule.yaml but in pipeline only thing that I can think of is to subdivide the operations of running PSRule.Rules.CAF into installing the module, overwritting mentioned .ps1 files with my own prepared in repo and then asserting the rule. If there is a better way, please let me know. I'm not sure if the overriding feature is missing or just documentation on how to do it. Maybe something needs to be added to ps-rule.yaml?

from psrule.rules.caf.

BernieWhite avatar BernieWhite commented on May 30, 2024

@majorku5anagi You can create a custom baseline or override settings in ps-rule.yaml.


Creating baselines is covered in https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Baseline/. You can create a custom baseline in the .ps-rule/ directory and reference it within your pipeline.

PSRule GitHub Action and Azure DevOps assert task allows a named baseline to be specified by the baseline: parameter.


To override in ps-rule.yaml specify one or more configuration options. For example:

configuration:
  CAF_UseLowerNames: false
  CAF_StoragePrefix: [ 'orgst', 'orgstvm', 'orgdls' ]

The list of configuration defaults is available from the built-in baseline: https://github.com/microsoft/PSRule.Rules.CAF/blob/main/src/PSRule.Rules.CAF/rules/Baseline.Rule.yaml

Not all configuration defaults are currently in use.

from psrule.rules.caf.

Related Issues (20)

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.