I got issue when CircleCI build to environment variable
Opened this issue · 3 comments
content of my variable DOCKER_HUB_TRIGGER:
curl -H "Content-Type:application/json" --data '{"build":true}' -X POST https://registry.hub.docker.com/u/hominhdat/docker-ci/trigger/132b6751-fb48-4c47-b141-96d6de2f9076/
this is error:
$DOCKER_HUB_TRIGGER
<html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>
I run the curl above in teminal command line the all thing work perfect. But the environment variable in CircleCI got error. Do you know why?
SOMEONE PLEASEEEE!!!
I have the same issue...
I have the same issue
I was able to find the solution here: https://discuss.circleci.com/t/successful-builds-not-triggering-docker-cloud-build-trigger-returning-curl-400-bad-request/15569/2
Short version: set the DOCKER_HUB_TRIGGER value to the following curl command:
curl --request POST --header Content-Type:application/json --data {"build":true} --url <YOUR_URL_FROM_DOCKER_HUB>