Clean up environment (secrets)

Hi there,

I’m having some issues with the secrets in my pipeline environment.
I created a simply python script that print all the env variables and checks if the mandatory ones has been defined before start with the rest of the pipeline. The script is simple as this:

import os

diff = MANDATORY_ENV.difference(os.environ)
if len(diff) > 0:
print(f"FAILED due missing var env variable: {diff}")

The drone.yaml has the following declaration:

  - name: *****
    image: *****
          from_secret: ENV1
          from_secret: ENV2

These are the (weird) issues that I’m facing:

  1. I still see some old secrets that were delete from the settings tab days ago…
  2. I tried to delete and add back the secrets via API. In the settings tab I see all of them but the pipeline seems that is not reading them because when I execute the pipeline I still see the old ones + I’m getting an error that I’m missing some env variables even if I have defined them in the settings tab

Any idea on what’s going on?

Thank you

There are no known issues with deleting secrets. There is no caching, so if a secret is deleted from the database it cannot be served to your pipeline. The only reason a secret could appear to still exist after being deleted at the repository level is if someone created a global secret or an organization secret of the same name.