Currently there is many publishers available:
while the HTTP Upload publisher looks fairly universal, it could be a lot of effort to publish to a custom, authenticated API endpoint, or even publish to a known endpoint (like S3) in a more opinionated/complex way (e.g. setting some extra HTTP headers for each object).
For that reason I'd like to propose creation of a custom publisher, which could offer more or less the same interface as the new build hooks, e.g.
publishers:
-
# Unique name of your publisher. Used for identification
name: "custom"
# IDs of the artifacts you want to publish
ids:
- foo
- bar
# Publish checksums (defaults to false)
checksum: true
# Publish signatures (defaults to false)
signature: true
# Working directory in which to execute the command
dir: "/utils"
# Command to be executed
cmd: custom-publisher.sh -product={{ .ProjectName }} -version={{ .Version }} {{ .ArtifactName }}
# Environment variables
env:
- API_TOKEN=secret-token
I'm willing to implement this, if there is agreement on the idea and direction in general.
(this was not meant to be labelled as bug - I just picked a wrong template)
I think its OK if we have the interface well-defined :)
Would like a PR for sure ;)
FYI: I just updated the example config snippet above as I'm working through the prototype. I will hopefully have a PR very 馃敎
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
FYI: I just updated the example config snippet above as I'm working through the prototype. I will hopefully have a PR very 馃敎