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
MANDATORY_ENV = {‘ENV1’ ‘ENV2’, …}
print(environ)
diff = MANDATORY_ENV.difference(os.environ)
if len(diff) > 0:
print(f"FAILED due missing var env variable: {diff}")
exit(1)
The drone.yaml has the following declaration:
steps:
- name: *****
image: *****
environment:
ENV1:
from_secret: ENV1
ENV2:
from_secret: ENV2
.....
These are the (weird) issues that I’m facing:
- I still see some old secrets that were delete from the settings tab days ago…
- 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