Hi,
I have an hourly pipeline job. Currently it runs every hour even when no checkin has been made. Is it possible for the hourly job to be executed only when a change has been checked in ? I tried the condition -> changesets -> includePaths & it didn't help.
Here's the snippet of my bitbucket-pipelines.yml.
- The hourly job uses the custom:scheduled
- The custom:default is for on-demand builds.
definitions:
steps:
- step: &build
max-time: 30 # set a 30 minute timeout
name: Build & Test
size: 2x
caches:
- gradle
script:
- utils/build-scripts/setup-image.sh
- BASH_ENV=utils/build-scripts/bashrc bash ./gradlew -no-daemon dist
- utils/build-scripts/upload-distribution.sh
pipelines:
custom:
default: # runs even with no change
- step: *build
scheduled: # runs this only on a schedule & only if there are changes
- step: *build
condition:
changesets:
includePaths:
# run only when any changes found
- "**"
Thanks!