New to using drone CI, running into some basic problems which I am sure someone can help (maybe I have been staring the problem for too long )
I have been trying to test custom logic using this link: Custom logic link. Just removed the step git checkout $DRONE_COMMIT. Here is the output:
+ git clone https://github.com/octocat/hello-world.git . Cloning into '.'... + go build can't load package: package .: no Go files in /drone/src
This fails in the build step. I tried looking for the path
/drone/src but couldnt find this path anywhere
- Is the git clone temporary? As I did try to find the cloned repos, and I couldn’t (both inside the agent and servers containers) or in shared docker volume.
More information, here is my docker-compose configuration:
version: '3.7' services: drone-server: container_name: drone_server image: drone/drone:latest ports: - xxxx:xxxx volumes: - /var/lib/drone:/data env_file: - ./drone-server.env restart: always environment: - DRONE_GITHUB_SERVER=https://github.com - DRONE_AGENTS_ENABLED=true - DRONE_TLS_AUTOCERT=false - DRONE_LOGS_TRACE=true - DRONE_LOGS_PRETTY=true - DRONE_LOGS_COLOR=true drone-agent: container_name: drone_agent image: drone/agent:latest ports: - xxxx:xxxx volumes: - /var/run/docker.sock:/var/run/docker.sock depends_on: - drone-server restart: always env_file: - ./drone-agent.env environment: - DRONE_RUNNER_CAPACITY=1 - DRONE_RUNNER_NAME=mazdoor - DRONE_LOGS_TRACE=true - DRONE_LOGS_PRETTY=true - DRONE_LOGS_COLOR=true
Passing the env vars in two files drone-agent.env and drone-server.env.
Can someone assist in this. I know this community to be highly engaging and helpful, hoping someone to point out issues in either the docker config or the actual drone yaml file.