Execute if the string is not part of the main repository commit message AND if the branch is masterĪll-conditions.yml build-step : description : Building the image. Note: Use “” around variables with text to avoid errors in processing the conditions. In this case, you can choose to execute if all expression conditions evaluate to true, or to execute if any expression conditions evaluate to true. This follows the standard condition expression syntax. Condition expressionsĪlternatively, you can use more advanced condition expressions. We use JavaScript regular expressions for the syntax in branch conditions. type : build dockerfile : Dockerfile image-name : someRepo/someUser when : branch : ignore : - master - develop Ignore-master-and-develop-branch.yml build-step : description : Building the image. Ignore the develop branch and master branch: type : build dockerfile : Dockerfile image-name : someRepo/someUser when : branch : only : - /^FB-.*/i Only-feature-branches.yml build-step : description : Building the image. Only execute for branches whose name begins with FB- prefix (feature branches): type : build dockerfile : Dockerfile image-name : someRepo/someUser when : branch : only : - master Only-master-branch.yml build-step : description : Building the image. Case insensitive regexps ( /^FB-/i) are also supported. Each branch specification can either be an exact branch name, e.g. Usually, you’ll want to define a branch condition, be it of the type ignore for blacklisting a set of branches or of the type only for allowlisting a set of branches. There are currently two main methods to define conditions: For details on the codefresh.yml file, see Pipeline definitions YAML.) Skip specific pipeline steps according to one or more conditionsįor each step in a codefresh.yml file, you can define a set of conditions which need to be satisfied in order to execute the step. Improve this page on GitHub Conditional execution of steps
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |