Thanks a lot! Fixed it by passing the token to docker-compose via -e like
docker-compose -f docker-compose.drone.yml exec -e CODECOV_TOKEN=$${CODECOV_TOKEN} -T photoprism make test-codecov
Complete config file: photoprism/.drone.yml at develop · photoprism/photoprism · GitHub
Seems the root issue was that environment variables are only set once when a container starts, so changed / new values are ignored when running commands via docker-compose exec by default.
While the -t parameter for the codecov bash script works when providing a valid token, it should be enough to just set the CODECOV_TOKEN variable. If $CODECOV_TOKEN is empty, then setting the token via -t $CODECOV_TOKEN
obviously also doesn’t work which is how I found out the value is missing completely. Note that Drone will also replace secret values with “secret” so it looked like the token was passed to the script.
Maybe modify the bash script so that “secret” is only shown when there actually is a secret and not just an empty string?