-
Suggestion
-
Resolution: Fixed
So I posted this on the Community Discussion site, but it's worth having here.
We need to restrict our pipeline steps to only run when commits contain changes in our client/*/ filepath glob.
Concourse.ci, Drone.ci, and I assume other CI servers provide the option to restrict steps to commits only containing certain file paths.
At the moment it seems we are limited to manually grepping "git log" and emitting an exit 1, which would cause the build to fail.
Ideally I'd want a branch build to not even start, so being able to specify branches and steps to only run when there are (or are not) matching files in the commit would look like:
- step: image: node:alpine-8 script: - npm install - npm run prod filter: includes: - client/src/**/* - package.json ...
So that commits containing file changes matching:
- server/*/ and client/*/ would run the above step
- server/*/ would not run the above step
- client/*/ would run the above step
- package.json would run the above step
Other examples:
- step:
filter:
excludes:
- server/**/*.cshtml
- step: filter: includes: - client/build/gulp/**/* excludes: - server/**/*.cshtml
excludes would prevent the step from running if any files in the commit match the patterns.
includes would ensure that the step only ran if at least one of the changed files matches the patterns.
- duplicates
-
BCLOUD-13370 For pipelines, as a user I want to be able to include/exclude files that trigger the build
- Closed
-
BCLOUD-19512 Add conditions to run a pipeline step
- Under Consideration
- is related to
-
BCLOUD-20700 Support "excludePaths" options in bitbucket-pipelines.yml's `condition` section
- Gathering Interest
- relates to
-
BCLOUD-19845 Trigger pipeline step conditionally based on environment variables
- Gathering Interest
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...