Finally slack notifications work!
This commit is contained in:
parent
5c306217e9
commit
06fd5a6617
11
generate.yml
11
generate.yml
|
|
@ -138,17 +138,18 @@
|
|||
failed_when: no
|
||||
|
||||
- name: generate secure hash
|
||||
command: "/usr/bin/travis encrypt --pro {{ secure.slack_token }} --no-interactive"
|
||||
command: /usr/bin/travis encrypt --pro "{{ secure.slack_token }}" --no-interactive
|
||||
register: travis_secure
|
||||
when:
|
||||
- travis.notifications.slack is defined
|
||||
- travis.notifications.slack | length < 512
|
||||
- (travis.notifications.slack.secure is defined and travis.notifications.slack.secure | length < 512) or
|
||||
travis.notifications.slack.secure is not defined
|
||||
|
||||
- name: overwrite travis.notifications.slack
|
||||
- name: overwrite travis.notifications.slack.secure
|
||||
set_fact:
|
||||
travis:
|
||||
notifications:
|
||||
slack: "{{ travis_secure.stdout | regex_replace('\"', '') }}"
|
||||
slack:
|
||||
secure: "{{ travis_secure.stdout | regex_replace('\"', '') }}"
|
||||
when:
|
||||
travis_secure.stdout is defined
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
{{ ansible_managed | comment }}
|
||||
language: python
|
||||
|
||||
os: linux
|
||||
dist: xenial
|
||||
|
||||
python:
|
||||
- "3.8"
|
||||
|
||||
|
|
@ -11,7 +14,7 @@ services:
|
|||
env:
|
||||
global:
|
||||
namespace="{{ docker_namespace }}"
|
||||
matrix:
|
||||
jobs:
|
||||
{% for platform in meta.galaxy_info.platforms %}
|
||||
{% for version in platform.versions %}
|
||||
{% for tag in distribution_version_mapping[platform.name][version] %}
|
||||
|
|
@ -36,5 +39,7 @@ script:
|
|||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
slack: "{{ travis.notifications.slack }}"
|
||||
slack:
|
||||
secure: {{ travis.notifications.slack.secure }}
|
||||
on_success: change
|
||||
email: false
|
||||
|
|
|
|||
Loading…
Reference in New Issue