- Login to Jenkins
- Manage Jenkins -> Manage Users -> Create User
- Login to Jenkins
- Manage Jenkins -> Configure Global Security
- User/group to add
- Enable: Overall read, Job build/discover/read
- Save
- Logout of Jeknins
- Login to Jenkins as user
- People -> USER -> Configure -> Show API Token
- Login to Jenkins
- Job -> Configure > check "Trigger builds remotely" -> Add
- "Authentication Token" -> Save
JENKINS_URL=""
JOB=""
USER=""
TOKEN=""
JOB_TOKEN=""
PARAMETERS=""
curl --user ${USER}:${TOKEN} ${JENKINS_UR}/job/${JOB}/build?token=${JOB_TOKEN}"
curl --user ${USER}:${TOKEN} ${JENKINS_URL}/job/${JOB}/buildWithParameters -d "token=${JOB_TOKEN}&${PARAMETERS}"