Slack stuff.
This commit is contained in:
parent
ccb374e2ca
commit
d5d4dc9240
20
generate.yml
20
generate.yml
|
|
@ -120,28 +120,28 @@
|
|||
register: galaxy_id
|
||||
changed_when: no
|
||||
|
||||
- name: load .travis.yml
|
||||
include_vars:
|
||||
file: "{{ role_path }}/.travis.yml"
|
||||
name: travis
|
||||
|
||||
- name: load secure.yml
|
||||
include_vars:
|
||||
file: secure.yml
|
||||
name: secure
|
||||
|
||||
- name: load .travis.yml
|
||||
include_vars:
|
||||
file: "{{ role_path }}/.travis.yml"
|
||||
name: travis
|
||||
|
||||
- name: generate secure hash
|
||||
command: "/usr/bin/travis encrypt --pro robertdebock:{{ secure.slack_token }}#builds --no-interactive"
|
||||
command: "/usr/bin/travis encrypt --pro robertdebock:{{ secure.slack_token }} --no-interactive"
|
||||
register: travis_secure
|
||||
when:
|
||||
- travis.notifications.slack.secure | length < 512
|
||||
- travis.notifications.slack is defined
|
||||
- travis.notifications.slack | length < 512
|
||||
|
||||
- name: overwrite travis.notifications.slack.secure
|
||||
- name: overwrite travis.notifications.slack
|
||||
set_fact:
|
||||
travis:
|
||||
notifications:
|
||||
slack:
|
||||
secure: "{{ travis_secure.stdout | regex_replace('\"', '') }}"
|
||||
slack: "{{ travis_secure.stdout | regex_replace('\"', '') }}"
|
||||
when:
|
||||
travis_secure.stdout is defined
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,5 @@ script:
|
|||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
slack:
|
||||
rooms:
|
||||
- secure: "{{ travis.notifications.slack.secure }}"
|
||||
slack: "{{ travis.notifications.slack }}"
|
||||
email: false
|
||||
|
|
|
|||
Loading…
Reference in New Issue