Drillster / drone-email

Drone plugin for sending email notifications
Apache License 2.0
44 stars 43 forks source link

Cannot start completely #76

Open 7system7 opened 6 months ago

7system7 commented 6 months ago

Hello,

I encountered a problem to start this plugin, after a successful built of the latest version.

Start the program

$ docker events&

$ docker run --rm \
   -e PLUGIN_FROM.ADDRESS=postmaster@example.com \
   -e PLUGIN_FROM.NAME="Postmaster" \
   -e PLUGIN_HOST=smtp.mailgun.org \
   -e PLUGIN_USERNAME=postmaster@example.com \
   -e PLUGIN_PASSWORD=<hash> \
   -v $(pwd):$(pwd) \
   -w $(pwd) \
   drillster/drone-email

The log

2024-01-06T20:22:56.624717186Z container create 847b2d9c0d6f3997263868944c56993d676b12b9bff711841faead8587efb2c4 (image=drillster/drone-email, name=tender_turing)
2024-01-06T20:22:56.629478399Z container attach 847b2d9c0d6f3997263868944c56993d676b12b9bff711841faead8587efb2c4 (image=drillster/drone-email, name=tender_turing)
2024-01-06T20:22:56.687088814Z network connect 547d07a2d58a04137086ee759c4945f42a19a6443aeb4cf023fab45db3cdf588 (container=847b2d9c0d6f3997263868944c56993d676b12b9bff711841faead8587efb2c4, name=bridge, type=bridge)
2024-01-06T20:22:57.168674274Z container start 847b2d9c0d6f3997263868944c56993d676b12b9bff711841faead8587efb2c4 (image=drillster/drone-email, name=tender_turing)
2024-01-06T20:22:58.081424310Z network disconnect 547d07a2d58a04137086ee759c4945f42a19a6443aeb4cf023fab45db3cdf588 (container=847b2d9c0d6f3997263868944c56993d676b12b9bff711841faead8587efb2c4, name=bridge, type=bridge)
2024-01-06T20:22:58.115151798Z container die 847b2d9c0d6f3997263868944c56993d676b12b9bff711841faead8587efb2c4 (execDuration=0, exitCode=0, image=drillster/drone-email, name=tender_turing)
2024-01-06T20:22:58.128285756Z container destroy 847b2d9c0d6f3997263868944c56993d676b12b9bff711841faead8587efb2c4 (image=drillster/drone-email, name=tender_turing)

List of running containers

$ docker ps -a
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
mjwwit commented 6 months ago

You're missing a couple of environment variables, you can check the example from the README.

7system7 commented 6 months ago

OK, I will try to set up every variable in the example. Anyway, is there any recommendation what to set up for pwd?

Is there any documentation what that variable's purpose? :slightly_smiling_face: (I know the docker's documentation but I do not know how to set up it for this container.)

mjwwit commented 6 months ago

You can check the config section in the docs to see what is configurable. The environment variable names related to these config settings are simply PLUGIN_{config}. There are other Drone related environment variables that are used, but these aren't documented. If you really want to know what is used, you can simply check the code. Generally, pwd is set to the project (repository) root. If I'm not mistaken it's only used to resolve a custom email template path (if used).