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
|
failed_when: no
|
||||||
|
|
||||||
- name: generate secure hash
|
- 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
|
register: travis_secure
|
||||||
when:
|
when:
|
||||||
- travis.notifications.slack is defined
|
- (travis.notifications.slack.secure is defined and travis.notifications.slack.secure | length < 512) or
|
||||||
- travis.notifications.slack | length < 512
|
travis.notifications.slack.secure is not defined
|
||||||
|
|
||||||
- name: overwrite travis.notifications.slack
|
- name: overwrite travis.notifications.slack.secure
|
||||||
set_fact:
|
set_fact:
|
||||||
travis:
|
travis:
|
||||||
notifications:
|
notifications:
|
||||||
slack: "{{ travis_secure.stdout | regex_replace('\"', '') }}"
|
slack:
|
||||||
|
secure: "{{ travis_secure.stdout | regex_replace('\"', '') }}"
|
||||||
when:
|
when:
|
||||||
travis_secure.stdout is defined
|
travis_secure.stdout is defined
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
{{ ansible_managed | comment }}
|
{{ ansible_managed | comment }}
|
||||||
language: python
|
language: python
|
||||||
|
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
|
|
||||||
python:
|
python:
|
||||||
- "3.8"
|
- "3.8"
|
||||||
|
|
||||||
|
|
@ -11,7 +14,7 @@ services:
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
namespace="{{ docker_namespace }}"
|
namespace="{{ docker_namespace }}"
|
||||||
matrix:
|
jobs:
|
||||||
{% for platform in meta.galaxy_info.platforms %}
|
{% for platform in meta.galaxy_info.platforms %}
|
||||||
{% for version in platform.versions %}
|
{% for version in platform.versions %}
|
||||||
{% for tag in distribution_version_mapping[platform.name][version] %}
|
{% for tag in distribution_version_mapping[platform.name][version] %}
|
||||||
|
|
@ -36,5 +39,7 @@ script:
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||||
slack: "{{ travis.notifications.slack }}"
|
slack:
|
||||||
|
secure: {{ travis.notifications.slack.secure }}
|
||||||
|
on_success: change
|
||||||
email: false
|
email: false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue