Drone

[CLOSED] Stage failed: Dependency cycle detected

I’m not able to get my pipeline to complete. Before it really starts I get an dependency cycle detected error. Can someone tell me what this means and how I can solve it?

trace from runner:

...
time="2020-06-25T10:23:30Z" level=trace msg="secret: database: found matching secret" kind=secret name=NUGET_USER_NAME thread=1
time="2020-06-25T10:23:30Z" level=trace msg="secret: database: found matching secret" kind=secret name=NPM_REGISTRY thread=1
time="2020-06-25T10:23:30Z" level=trace msg="secret: database: found matching secret" kind=secret name=NPM_AUTH_TOKEN thread=1
time="2020-06-25T10:23:31Z" level=debug msg="updated stage to running" build.id=6 build.number=6 repo.id=37 repo.name=TestApp repo.namespace=MyWorkspace stage.id=6 stage.name=default stage.number=1 thread=1
time="2020-06-25T10:23:32Z" level=debug msg="stage failed" build.id=6 build.number=6 duration=2 error="1 error occurred:\n\t* dependency cycle detected\n\n" repo.id=37 repo.name=TestApp repo.namespace=MyWorkspace stage.id=6 stage.name=default stage.number=1 thread=1

.drone.yml

---
kind: pipeline
type: docker
name: default

platform:
  os: linux
  arch: arm64

steps:
- name: docker  
  image: plugins/docker
  environment:
    NPM_AUTH_TOKEN:
      from_secret: NPM_AUTH_TOKEN
    NUGET_AUTH_TOKEN:
      from_secret: NUGET_AUTH_TOKEN
    NUGET_USER_NAME:
      from_secret: NUGET_USER_NAME
  settings:
    repo: 
      from_secret: NPM_REPO
    auto_tag: true
    registry:
      from_secret: NPM_REGISTRY
    auth:
      from_secret: NPM_AUTH_TOKEN
    dockerfile: /.drone/Dockerfile
    build_args_from_env:
    - NPM_AUTH_TOKEN
    - NUGET_AUTH_TOKEN
    - NUGET_USER_NAME

services:
- name: docker
  image: docker:dind
  privileged: true
  volumes:
  - name: dockersock
    path: /var/run

volumes:
- name: dockersock
  temp: {}

container names need to be unique, however, in this example both the service container and the step container are named “docker” which causes issues.

1 Like

That solved it. Thank you!