Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Files not scanned - Bitbucket Pipeline #232

Open
glewiswp opened this issue Apr 19, 2017 · 1 comment
Open

Files not scanned - Bitbucket Pipeline #232

glewiswp opened this issue Apr 19, 2017 · 1 comment

Comments

@glewiswp
Copy link

I'm attempting to set this up using a Bitbucket pipeline and it looks like travis.script.sh fires up but PHPCS never scans any files, like the .diff file is not being read properly inside of check-diff.sh. travis.install.sh runs without any issues but when I hit travis.script.sh in the execution the tests always return the following:

source $DEV_LIB_PATH/travis.script.sh
## Checking files, scope patches:

Skipping codeception since not configured

I've tried both install methods (submodule/non) and both return the same results. I've also tried setting the CHECK_SCOPE environment variable to changed-files but same result.

Maybe I'm overlooking something obvious, or maybe wp-dev-lib doesn't work properly with Bitbucket pipelines?

@westonruter
Copy link
Contributor

@glewiswp it has never been tested with Bitbucket pipelines, no.

You can see that there are some specific Travis environment variables that are read here:

wp-dev-lib/check-diff.sh

Lines 58 to 75 in 74c9ceb

if [ "$TRAVIS" == true ]; then
if [[ "$TRAVIS_PULL_REQUEST" != 'false' ]]; then
# Make sure the remote branch is fetched.
if [[ -z "$DIFF_BASE" ]] && ! git rev-parse --verify --quiet "$TRAVIS_BRANCH"; then
git fetch origin "$TRAVIS_BRANCH"
git branch "$TRAVIS_BRANCH" FETCH_HEAD
fi
DIFF_BASE=${DIFF_BASE:-$TRAVIS_BRANCH}
else
DIFF_BASE=${DIFF_BASE:-$TRAVIS_COMMIT^}
fi
DIFF_HEAD=${DIFF_HEAD:-$TRAVIS_COMMIT}
else
DIFF_BASE=${DIFF_BASE:-HEAD}
DIFF_HEAD=${DIFF_HEAD:-WORKING}
fi

If you can open a PR with the equivalents for Bitbucket then it should work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants