From 2457c13302f47ca982166cd7f8b7c8406251b892 Mon Sep 17 00:00:00 2001 From: Michael Balsillie Date: Mon, 22 Aug 2022 12:12:31 +1200 Subject: [PATCH] re-add notifications --- .woodpecker.yml | 61 +++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 25b7849..c9d1408 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -23,6 +23,7 @@ pipeline: image: docker:latest volumes: - /var/run/docker.sock:/var/run/docker.sock + - /etc/localtime:/etc/localtime:ro environment: *vars secrets: @@ -40,34 +41,34 @@ pipeline: $${CONTEXT} - docker push -a $REGISTRY/$${CI_REPO} - # notify-matrix-success: - # image: code.balsillie.net/containers/woodpecker-util - # pull: false - # when: - # - event: tag - # status: [ success ] - # environment: - # *vars - # secrets: - # - source: MATRIX_ACCESS_TOKEN - # target: MATRIX_ACCESS_TOKEN - # commands: - # - shoutrrr send - # --url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM} - # --message "New image build of $${CI_REPO}, $${CI_COMMIT_TAG}, has been completed and pushed." + notify-matrix-success: + image: code.balsillie.net/containers/woodpecker-util + pull: false + when: + - status: + - success + environment: + *vars + secrets: + - source: MATRIX_ACCESS_TOKEN + target: MATRIX_ACCESS_TOKEN + commands: + - shoutrrr send + --url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM} + --message "New image build of $${CI_REPO}, $${CI_COMMIT_TAG}, has been completed and pushed." - # notify-matrix-failure: - # image: code.balsillie.net/containers/woodpecker-util - # pull: false - # when: - # - event: tag - # status: [ failure ] - # environment: - # *vars - # secrets: - # - source: MATRIX_ACCESS_TOKEN - # target: MATRIX_ACCESS_TOKEN - # commands: - # - shoutrrr send - # --url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM} - # --message "New image build of $${CI_REPO}, $${CI_COMMIT_TAG}, has failed." \ No newline at end of file + notify-matrix-failure: + image: code.balsillie.net/containers/woodpecker-util + pull: false + when: + - status: + - failure + environment: + *vars + secrets: + - source: MATRIX_ACCESS_TOKEN + target: MATRIX_ACCESS_TOKEN + commands: + - shoutrrr send + --url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM} + --message "New image build of $${CI_REPO}, $${CI_COMMIT_TAG}, has failed." \ No newline at end of file