diff --git a/ci/bash-lib.yml b/ci/bash-lib.yml index 5b263f653e..36a32ad496 100644 --- a/ci/bash-lib.yml +++ b/ci/bash-lib.yml @@ -22,5 +22,12 @@ steps: echo "Authorization: basic $(git config remote.origin.url | grep -o '://.*:.*@' | cut -c4- | rev | cut -c2- | rev | tr -d '\n' | base64 -w0)" fi } + tell_slack() { + local message channel + message="$1" + channel=${2:-$(Slack.team-daml)} + jq -n --arg message "$message" '{"text": $message}' \ + | curl -XPOST -i -H 'Content-Type: application/json' -d @- $channel + } END echo "##vso[task.setvariable variable=${{parameters.var_name}}]$TMP" diff --git a/ci/cron/tuesday.yml b/ci/cron/tuesday.yml new file mode 100644 index 0000000000..ebe680d0b6 --- /dev/null +++ b/ci/cron/tuesday.yml @@ -0,0 +1,33 @@ +# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +pr: none +trigger: none + +schedules: +- cron: "0 6 * * Tue" + displayName: Tuesday + branches: + include: + - master + always: true + +jobs: +- job: announce_rotation + timeoutInMinutes: 60 + pool: + vmImage: ubuntu-latest + steps: + - checkout: self + persistCredentials: true + - template: ../bash-lib.yml + parameters: + var_name: bash_lib + - bash: | + set -euo pipefail + + source "$(bash_lib)" + + RELEASE_MANAGER=$(head -1 release/rotation | awk '{print $1}') + + tell_slack "Hi <@$RELEASE_MANAGER>! According to the , you are in charge of the release tomorrow. Please make sure you plan accordingly, or find a replacement."