How do I get the output of a shell command executed using into a variable from Jenkinsfile (groovy)?

The latest version of the pipeline sh step allows you to do the following; // Git committer email GIT_COMMIT_EMAIL = sh ( script: ‘git –no-pager show -s –format=\’%ae\”, returnStdout: true ).trim() echo “Git committer email: ${GIT_COMMIT_EMAIL}” Another feature is the returnStatus option. // Test commit message for flags BUILD_FULL = sh ( script: “git log … Read more

Docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

If using jenkins The user jenkins needs to be added to the group docker: sudo usermod -a -G docker jenkins Then restart Jenkins. Otherwise If you arrive to this question of stack overflow because you receive this message from docker, but you don’t use jenkins, most probably the error is the same: your unprivileged user … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)