Since mattermost-plugin version 2.7.1 (where endpoint type was changed from String to Secret) it's not possible to set endpoint configuration for mattermostNotifier with a JobDSL script.
ERROR: (unknown source) No signature of method: javaposse.jobdsl.plugin.structs.DescribableContext.endpoint() is applicable for argument types: (java.lang.String) values: [https://MATTERMOST/hooks/xxxxxxxxxxxx]