Doesn’t seem to override meaning, even with clear cache and deploy site, the build is cancelled if there are no site “code” changes.
1:03:30 PM: Build ready to start
1:11:12 PM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
1:11:12 PM: build-image tag: v3.8.0
1:11:12 PM: buildbot version: cfefda0a665468fabfafc38698dc693541f06929
1:11:12 PM: Building without cache
1:11:12 PM: Starting to prepare the repo for build
1:11:13 PM: No cached dependencies found. Cloning fresh repo
1:11:13 PM: git clone https://github.com/***/website
1:11:14 PM: Preparing Git Reference refs/heads/develop
1:11:15 PM: Parsing package.json dependencies
1:11:15 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'packages/***/out' versus 'out' in the Netlify UI
1:11:15 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'packages/***/serverless' versus '' in the Netlify UI
1:11:15 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'yarn --cwd ../../common/***/ postinstall && yarn build' versus '' in the Netlify UI
1:11:15 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../../common/'
1:11:15 PM: User-specified ignore command returned exit code 0. Returning early from build.
1:11:15 PM: Creating deploy upload records
1:11:15 PM: Failed during stage 'checking build content for changes': Canceled build due to no content change
1:11:15 PM: Finished processing build request in 3.113492805s
Hey @moop-moop,
I don’t know of a way to override the ignore command, but one way you could handle the env var changes is have a boolean like ENV_CHANGE, and check for the value in your ignore script. So something like this (caveat: writing Bash is… not my expertise!):
#!/bin/bash
if [[ $ENV_CHANGE = true ]]
then
exit 1
elif [[ git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../../common/ ]]
then
exit 0
else
exit 1
fi
The added overhead here is that you have to remember to switch variable’s value when you make a relevant change. You may be able to adapt other examples from here: [Support Guide] How to use the ignore command
@gualter I posted this as an answer to the original question. It solves the problem that builds are skipped even when triggered through a build hook or throug the UI. With my solution, they’re not skipped anymore.