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