$(pwd) could break a CI pipeline. For example, running Jenkins using one shot slaves gives this as the directory --> PWD=/home/jenkins-slave/workspace/<repo name>@2 --> and this causes the error message below.
java.io.IOException: Failed to run image 'newtmitch/sonar-scanner:3.2.0-alpine'. Error: docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
See 'docker run --help'.
Versions used:
newtmitch/sonar-scanner:3.2.0-alpine
docker version
Client:
Version: 18.09.6
API version: 1.39
Go version: go1.10.8
Git commit: 481bc77
Built: Sat May 4 02:35:27 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.6
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: 481bc77
Built: Sat May 4 01:59:36 2019
OS/Arch: linux/amd64
Experimental: false
Heya, quick improvement request.
Using
$PWD
instead of$(pwd)
solves two problems.$(pwd)
could break a CI pipeline. For example, running Jenkins using one shot slaves gives this as the directory -->PWD=/home/jenkins-slave/workspace/<repo name>@2
--> and this causes the error message below.Versions used: