Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Slashdeploy can fail when you use mirrored repositories #182

@jherico

Description

@jherico

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions