diff --git a/components/consumers/slack/Dockerfile b/components/consumers/slack/Dockerfile new file mode 100644 index 000000000..8d0a1774e --- /dev/null +++ b/components/consumers/slack/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3.20 + +RUN apk add --no-cache ca-certificates + +COPY ./components/consumers/slack/slack /app/components/consumers/slack/slack + +ENTRYPOINT ["/app/components/consumers/slack/slack"] \ No newline at end of file diff --git a/components/consumers/slack/Makefile b/components/consumers/slack/Makefile new file mode 100644 index 000000000..abf3c1326 --- /dev/null +++ b/components/consumers/slack/Makefile @@ -0,0 +1,17 @@ +.PHONY: container publish + +CONTAINER_REPO= +DRACON_VERSION= +SOURCE_CODE_REPO= +PRODUCER_AGGREGATOR_BASE_IMAGE=$(shell test -e .custom_image && cat .custom_image || echo "scratch") + +DOCKER=docker + +container: + $(DOCKER) build --tag $(CONTAINER_REPO)/components/consumers/slack:$(DRACON_VERSION) \ + --file Dockerfile \ + $$([ "${SOURCE_CODE_REPO}" != "" ] && echo "--label=org.opencontainers.image.source=${SOURCE_CODE_REPO}" ) \ + ../../../bin 1>&2 + +publish: + $(DOCKER) push $(CONTAINER_REPO)/components/consumers/slack:$(DRACON_VERSION) 1>&2 diff --git a/components/consumers/slack/task.yaml b/components/consumers/slack/task.yaml index 87efe50e1..b80b03110 100644 --- a/components/consumers/slack/task.yaml +++ b/components/consumers/slack/task.yaml @@ -8,9 +8,11 @@ metadata: spec: params: - name: consumer-slack-webhook + description: "The Slack webhook to send messages to. Follow this guide to generate: https://api.slack.com/messaging/webhooks" type: string - name: consumer-slack-message-template type: string + description: "The message template to use when sending messages to Slack. The following variables are available: , , , " default: 'Dracon scan , started at , completed with findings, out of which, new' workspaces: - name: output