From 421735c7c74e45905bca51221b9893f23306c463 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Wed, 11 Dec 2019 23:40:26 +0100 Subject: [PATCH] new: pkg: added rocket.chat messaging Signed-off-by: Valentin Lab --- .drone.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.drone.yml b/.drone.yml index 17f2345..2a509b5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -45,6 +45,36 @@ steps: release=$(cat release) echo "PUSHED DOCKER IMAGE: docker.0k.io/mirror/odoo/$release" echo "PUSHED GIT TAG: release/candidate/$release" + - name: rocket + ## mirror of ref: mike1pol/drone-rocket + image: docker.0k.io/drone-rocket + settings: + url: {from_secret: ROCKETCHAT_URL} + user_id: {from_secret: ROCKETCHAT_USER_ID} + token: {from_secret: ROCKETCHAT_TOKEN} + channel: "#odoo_releases" + commands: + - release=$(cat release) + - | + ## DRONE will substitute bash variables BEFORE bash + export COMMIT_MESSAGE=$(echo -e ${DRONE_COMMIT_MESSAGE} | head -n 1) + - | + export MESSAGE="{{#success build.status}}✅{{else}}❌{{/success}} Build {{build.status}} \ + // *Summary:* $COMMIT_MESSAGE [ _${DRONE_COMMIT_AUTHOR_NAME}_ ] + build: [{{build.number}}]({{build.link}}) / branch: \`{{build.branch}}\` / \ + commit: \`${DRONE_COMMIT_SHA:0:8}\` + {{#success build.status}} + *GIT TAG:* \`release/candidate/$release\` _(freezed version)_ + *DOCKER IMAGES:* + - \`docker.0k.io/mirror/odoo/$release\` _(unique tag)_ + - \`docker.0k.io/mirror/odoo:${DRONE_COMMIT_BRANCH//\//_}\` _(floating reference)_ + Total Build time was $((DRONE_JOB_FINISHED - DRONE_JOB_STARTED))s + {{/success}}" + - rocket + when: + status: + - success + - failure volumes: - name: docker