According docs https://docs.drone.io/secret/organization/
Per organization secrets and environment can only use with steps,example
kind: pipeline
name: default
steps:
- name: build
image: alpine
environment:
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
but not for full yaml
kind: pipeline
name: default
environment:
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
steps:
- name: build
image: alpine
That will return error message
Integration: yaml: unmarshal errors: line 8: cannot unmarshal !!map into string
and another question,can’t use environment var with char together
- name: publish
image: plugins/docker
environment:
REGISTRY:
from_secret: docker_registry
settings:
repo: $${REGISTRY}aimcheap/test
will return error
Error parsing reference: "${REGISTRY}aimcheap/test:latest" is not a valid repository/tag