pluralsight-docker-CI icon indicating copy to clipboard operation
pluralsight-docker-CI copied to clipboard

I got issue when CircleCI build to environment variable

Open hominhdat opened this issue 8 years ago • 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?

hominhdat avatar Jan 09 '17 11:01 hominhdat

SOMEONE PLEASEEEE!!! I have the same issue...

madferreiro avatar Jun 23 '17 21:06 madferreiro

I have the same issue

lukehaas avatar Dec 12 '17 18:12 lukehaas

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>

neugenes avatar May 28 '18 16:05 neugenes