@Override
    public Optional<String> reveal(String secret) throws IOException {
        if (StringUtils.isBlank(secret)) {
            return Optional.empty();
        }
        final File file = new File(secrets, secret);
        if (file.isFile()) {
            return Optional.of(
                    FileUtils.readFileToString(file, StandardCharsets.UTF_8).trim());
        } else if (file.exists()) {
            throw new IOException("Cannot load non-file " + file);
        }
        return Optional.empty();
    }
{@link SecretSource} implementation relying on <a href="https://docs.docker.com/engine/swarm/secrets">docker secrets</a>.
The path to secret directory can be overridden by setting environment variable <code>SECRETS</code>.
@author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
plugin/src/main/java/io/jenkins/plugins/casc/impl/secrets/DockerSecretSource.java