When you manually run a CI/CD Pipeline form the UI with “Run Pipeline” you can specify variables. I would like to know if this functionality exists from the CLI commit message/push. Essentially I would like my pipeline to run with user specific variables. For example the users IP address or the users credentials. So when a user pushes to the pipeline they need to input their own variables. Right now my plan is to parse the commit message for things like:
"trigger pipeline with IP:127.0.0.1"
for word in ${CI_COMMIT_MESSAGE}; do
if [[ "${word}" == *":"* ]]; then
variable=`echo $word | cut -d":" -f1`
value=`echo $word | cut -d":" -f2`
eval $variable="$value"
fi
done
This isn’t pretty and may even be bad practice so I’m open to other suggestions but I think the best solution is to be able to set variables in the commit/push command.