Hi there,
I have started getting a nullPointer Exception being thrown from my pipeline by checkstyle.
It started when I was using 0.2.0 . I have tried upgrading to 0.3.0 to no avail.
Here is the log from the pipeline:
<span>+ docker container run \</span>
<span>--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \</span>
<span>--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \</span>
<span>--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \</span>
<span>--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \</span>
<span>--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/checkstyle-report:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/checkstyle-report \</span>
<span>--workdir=$(pwd) \</span>
<span>--label=org.bitbucket.pipelines.system=true \</span>
<span>--env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \</span>
<span>--env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \</span>
<span>--env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \</span>
<span>--env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \</span>
<span>--env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \</span>
<span>--env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \</span>
<span>--env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \</span>
<span>--env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \</span>
<span>--env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \</span>
<span>--env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \</span>
<span>--env=BITBUCKET_PARALLEL_STEP_COUNT="$BITBUCKET_PARALLEL_STEP_COUNT" \</span>
<span>--env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \</span>
<span>--env=CI="$CI" \</span>
<span>--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \</span>
<span>--env=BITBUCKET_PARALLEL_STEP="$BITBUCKET_PARALLEL_STEP" \</span>
<span>--env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \</span>
<span>--env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \</span>
<span>--env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \</span>
<span>--env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \</span>
<span>--env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \</span>
<span>--env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \</span>
<span>--env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \</span>
<span>--env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \</span>
<span>--env=DOCKER_HOST="tcp://host.docker.internal:2375" \</span>
<span>--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \</span>
<span>--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/checkstyle-report" \</span>
<span>--env=CHECKSTYLE_REPORT_ID="checkstyle-1" \</span>
<span>--env=CHECKSTYLE_RESULT_PATTERN=".*/checkstyle-result.xml$" \</span>
<span>--env=REPORT_FAIL_SEVERITY="info" \</span>
<span>--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \</span>
<span>bitbucketpipelines/checkstyle-report:0.3.0</span>
<span>Unable to find image 'bitbucketpipelines/checkstyle-report:0.3.0' locally</span>
<span>0.3.0: Pulling from bitbucketpipelines/checkstyle-report</span>
<span>e7c96db7181b: Pulling fs layer</span>
<span>f910a506b6cb: Pulling fs layer</span>
<span>b6abafe80f63: Pulling fs layer</span>
<span>7d6a3104b9c1: Pulling fs layer</span>
<span>7d6a3104b9c1: Waiting</span>
<span>f910a506b6cb: Verifying Checksum</span>
<span>f910a506b6cb: Download complete</span>
<span>e7c96db7181b: Verifying Checksum</span>
<span>e7c96db7181b: Download complete</span>
<span>e7c96db7181b: Pull complete</span>
<span>f910a506b6cb: Pull complete</span>
<span>7d6a3104b9c1: Verifying Checksum</span>
<span>7d6a3104b9c1: Download complete</span>
<span>b6abafe80f63: Verifying Checksum</span>
<span>b6abafe80f63: Download complete</span>
<span>b6abafe80f63: Pull complete</span>
<span>7d6a3104b9c1: Pull complete</span>
<span>Digest: sha256:d303220db226c19f69a05c1964caa4a67469842e80f3eb365da06b20ec3cd905</span>
<span>Status: Downloaded newer image for bitbucketpipelines/checkstyle-report:0.3.0</span>
<span>Exception in thread "main" java.lang.NullPointerException</span>
<span>at sun.nio.fs.UnixPath.normalizeAndCheck(<a href="http://unixpath.java:77/" rel="noopener nofollow noreferrer" target="_blank">UnixPath.java:77</a>)</span>
<span>at sun.nio.fs.UnixPath.<init>(<a href="http://unixpath.java:71/" rel="noopener nofollow noreferrer" target="_blank">UnixPath.java:71</a>)</span>
<span>at sun.nio.fs.UnixFileSystem.getPath(<a href="http://unixfilesystem.java:281/" rel="noopener nofollow noreferrer" target="_blank">UnixFileSystem.java:281</a>)</span>
<span>at java.nio.file.Paths.get(<a href="http://paths.java:84/" rel="noopener nofollow noreferrer" target="_blank">Paths.java:84</a>)</span>
<span>at com.atlassian.bitbucket.pipelines.checkstyle.report.Main.main(<a href="http://main.java:69/" rel="noopener nofollow noreferrer" target="_blank">Main.java:69</a>)</span>
this is for a java based project. here is my pipeline
# Template maven-build
# This template allows you to test and build your Java project with Maven.
# The workflow allows running tests, code checkstyle and security scans on the default branch.
# Prerequisites: pom.xml and appropriate project structure should exist in the repository.
image: maven:3.6.3
pipelines:
default:
- parallel:
- step:
name: Build and Test
caches:
- maven
script:
- mvn -B verify --file pom.xml package
artifacts:
- $BITBUCKET_CLONE_DIR/target/v*
after-script:
- mkdir artifacts_for_deploy
- mv target/v*war artifacts_for_deploy
- pipe: atlassian/aws-s3-deploy:1.1.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-west-1'
S3_BUCKET: $AWS_IFS_S3_ARTIFACT_BUCKET
LOCAL_PATH: 'artifacts_for_deploy'
COMMAND: 'upload'
- step:
name: checkstyle
script:
- pipe: atlassian/checkstyle-report:0.3.0
- step:
name: Security Scan
script:
# Run a security scan for sensitive data.
# See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security
- pipe: atlassian/git-secrets-scan:0.4.3