I am trying to run jenkins swarm agent using the docker-compose provided here.
Issue is I am using a service account provided by my admin team to authenticate against jenkins master and the password for the service account contains special characters \ (backslash) and / (forward slash). Example:
abcdefghifjd12\ab/
The docker secret I created using this password doesn't work. I tried with my personal account which doesn't have any special characters and this works as expected. So I believe issue is with how docker is interpreting these special characters when creating secrets. I tried escaping the back slash and using single quotes for the password but doesn't work. I tried below
#use password as it is in double quotes
echo "abcdefghifjd12\ab/" | docker secret create jenkins-user -
#use backslash to escape backslash
echo "abcdefghifjd12\\ab/" | docker secret create jenkins-user -
#use single quotes
echo 'abcdefghifjd12\ab/' | docker secret create jenkins-user -
None worked. How do I resolve this issue?
Server:
Version: 17.06.2-ee-6
API version: 1.30 (minimum version 1.12)
Go version: go1.8.3
Git commit: e75fdb8
Built: Mon Nov 27 22:44:25 2017
OS/Arch: linux/amd64
Experimental: false