I have a setup where I have a main repo graph-web which has CI jobs that mirror branches main-a and main-b to other repositories of graph-web-a and graph-web-b respectively.
There's an additional CircleCI task that runs on all branches that pushes a docker image to dockerhub tagged with the repo name and the commit hash.
However, I discovered that the github deployments for the mirror jobs were failing. Investigation led me to discover that when an event is received from github about a status change, Slashdeploy looks up ALL pending auto deployments related to corresponding commit hash, regardless of the repository: AutoDeployment.lock.active.where(sha: status.sha).each do |auto_deployment|
This means that when the docker_image CI task on the root repository completes, it triggers the deployment of the mirror-repository branch, which has not yet completed the same job, and therefore hasn't pushed the appropriate tag to dockerhub. The deployment can't find the docker image and fails.
I have a setup where I have a main repo
graph-web
which has CI jobs that mirror branchesmain-a
andmain-b
to other repositories ofgraph-web-a
andgraph-web-b
respectively.There's an additional CircleCI task that runs on all branches that pushes a docker image to dockerhub tagged with the repo name and the commit hash.
However, I discovered that the github deployments for the mirror jobs were failing. Investigation led me to discover that when an event is received from github about a status change, Slashdeploy looks up ALL pending auto deployments related to corresponding commit hash, regardless of the repository:
AutoDeployment.lock.active.where(sha: status.sha).each do |auto_deployment|
This means that when the
docker_image
CI task on the root repository completes, it triggers the deployment of the mirror-repository branch, which has not yet completed the same job, and therefore hasn't pushed the appropriate tag to dockerhub. The deployment can't find the docker image and fails.