From 979f3f67c93766806a485132f9df7d8f5fe09239 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 17 Oct 2018 11:57:06 +0100 Subject: Remove instance-gitlab-bot-config.yml playbook and files --- baserock_webserver/gitlab-bot/config.js | 152 --------------------- baserock_webserver/gitlab-bot/gitlab-bst-bot.conf | 19 --- .../gitlab-bot/gitlab-bst-bot.service.in | 12 -- .../gitlab-bot/gitlab_bot_secrets.yml | 10 -- .../gitlabirced/gitlab_bot_secrets.yml | 10 ++ baserock_webserver/instance-gitlab-bot-config.yml | 45 ------ baserock_webserver/instance-gitlabirced-config.yml | 2 +- 7 files changed, 11 insertions(+), 239 deletions(-) delete mode 100644 baserock_webserver/gitlab-bot/config.js delete mode 100644 baserock_webserver/gitlab-bot/gitlab-bst-bot.conf delete mode 100644 baserock_webserver/gitlab-bot/gitlab-bst-bot.service.in delete mode 100644 baserock_webserver/gitlab-bot/gitlab_bot_secrets.yml create mode 100644 baserock_webserver/gitlabirced/gitlab_bot_secrets.yml delete mode 100644 baserock_webserver/instance-gitlab-bot-config.yml (limited to 'baserock_webserver') diff --git a/baserock_webserver/gitlab-bot/config.js b/baserock_webserver/gitlab-bot/config.js deleted file mode 100644 index a017e232..00000000 --- a/baserock_webserver/gitlab-bot/config.js +++ /dev/null @@ -1,152 +0,0 @@ -module.exports = { - // IRC server to connect to. - servers: { - gimp: { - url: 'irc.gimp.org', - nick: 'gitlab-br-bot', - password: '{{ gitlab_bot_password }}', - sasl: false - }, - freenode: { - url: 'irc.freenode.net', - nick: 'gitlab-br-bot', - password: '{{ gitlab_bot_password }}', - sasl: true - } - }, - - // List of channels / people to report to. - triggers: [ - { - project: 'baserock/definitions', - network: 'freenode', - reports: { - '#baserock': ['merge_request', 'issue'] - } - }, - { - project: 'baserock/infrastructure', - network: 'freenode', - reports: { - '#baserock': ['merge_request', 'issue'] - } - }, - { - project: 'baserock/lorry', - network: 'freenode', - reports: { - '#baserock': ['merge_request', 'issue'] - } - }, - { - project: 'baserock/lorries', - network: 'freenode', - reports: { - '#baserock': ['merge_request', 'issue'] - } - }, - { - project: 'baserock/ybd', - network: 'freenode', - reports: { - '#baserock': ['merge_request', 'issue'] - } - }, - { - project: 'BuildStream/buildstream', - network: 'gimp', - reports: { - '#buildstream': ['merge_request', 'issue'] - } - }, - { - project: 'BuildStream/bst-external', - network: 'gimp', - reports: { - '#buildstream': ['merge_request', 'issue'] - } - }, - { - project: 'BuildStream/jhbuild2bst', - network: 'gimp', - reports: { - '#buildstream': ['merge_request', 'issue'] - } - }, - { - project: 'BuildStream/defs2bst', - network: 'gimp', - reports: { - '#buildstream': ['merge_request', 'issue'] - } - }, - { - project: 'BuildStream/debootstrap-ostree', - network: 'gimp', - reports: { - '#buildstream': ['merge_request', 'issue'] - } - }, - { - project: 'BuildStream/gnome-modulesets-base', - network: 'gimp', - reports: { - '#buildstream': ['merge_request', 'issue'] - } - }, - { - project: 'BuildStream/cargo-fetcher', - network: 'gimp', - reports: { - '#buildstream': ['merge_request', 'issue'] - } - }, - { - project: 'BuildStream/buildstream-docker-images', - network: 'gimp', - reports: { - '#buildstream': ['merge_request', 'issue'] - } - }, - { - project: 'freedesktop-sdk/freedesktop-sdk', - network: 'freenode', - reports: { - '#freedesktop-sdk': ['merge_request'] - } - }, - { - project: 'freedesktop-sdk/json2bst', - network: 'freenode', - reports: { - '#freedesktop-sdk': ['merge_request'] - } - }, - { - project: 'freedesktop-sdk/infrastructure', - network: 'freenode', - reports: { - '#freedesktop-sdk': ['merge_request'] - } - }, - ], - - // IRC nick/names for the bot - userName: 'gitlab-br-bot', - realName: 'Gitlab Bot provided by Baserock', - - // Secret as entered in the Gitlab Webhook instance. - secret: '{{ gitlab_buildstream_secret }}', - - // Port on which to run. - port: 1337, - - // Network interface on which to run the webhook server. - hostname: '0.0.0.0', - - // Instance of lstu to shorten links -- keep empty to not use. - //lstu: 'https://lstu.fr', - - // Whether the irc client debug messages should be printed. - debug: true -} diff --git a/baserock_webserver/gitlab-bot/gitlab-bst-bot.conf b/baserock_webserver/gitlab-bot/gitlab-bst-bot.conf deleted file mode 100644 index b34026a8..00000000 --- a/baserock_webserver/gitlab-bot/gitlab-bst-bot.conf +++ /dev/null @@ -1,19 +0,0 @@ -# /etc/init/gitlab-bst-bot.conf - -description "Gitlab irc notifications server" - -start on startup -stop on shutdown - - -# Automatically Respawn: -respawn -respawn limit 99 5 - -setuid ubuntu -setgid ubuntu - -script - cd {{ gitlab_to_irc_install_location }} - exec sudo node index.js -end script diff --git a/baserock_webserver/gitlab-bot/gitlab-bst-bot.service.in b/baserock_webserver/gitlab-bot/gitlab-bst-bot.service.in deleted file mode 100644 index a2374795..00000000 --- a/baserock_webserver/gitlab-bot/gitlab-bst-bot.service.in +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description = Gitlab irc notifications server - -[Service] -Type = simple -ExecStart = /usr/bin/node {{ gitlab_to_irc_install_location }}/index.js -User = fedora -Group = fedora -Restart = on-failure - -[Install] -WantedBy=multi-user.target diff --git a/baserock_webserver/gitlab-bot/gitlab_bot_secrets.yml b/baserock_webserver/gitlab-bot/gitlab_bot_secrets.yml deleted file mode 100644 index e25172e0..00000000 --- a/baserock_webserver/gitlab-bot/gitlab_bot_secrets.yml +++ /dev/null @@ -1,10 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -61346433666533613665376130646438613334333839323766323963313337653038316165383166 -3537633331366339363630316131376661616564623135620a623239653938383266653335396335 -64323365313962623639336663363038663335323166363035326437356264646334613931373962 -3062653034303538610a343938633035393465323231616664626532393136643431633131643864 -30316565353136323566336464313865343565346539306533383739636230653336663831313765 -65623334646261613137383230626362323336376436633463383166653865303666633363303131 -38393664383361393262306639306463343664306230626266316462663436376163386262303663 -33623831626237643635306363663237656261323561393834383066623830336538653938663262 -37303437393636313063653761316138336535623266366262613938623238326139 diff --git a/baserock_webserver/gitlabirced/gitlab_bot_secrets.yml b/baserock_webserver/gitlabirced/gitlab_bot_secrets.yml new file mode 100644 index 00000000..e25172e0 --- /dev/null +++ b/baserock_webserver/gitlabirced/gitlab_bot_secrets.yml @@ -0,0 +1,10 @@ +$ANSIBLE_VAULT;1.1;AES256 +61346433666533613665376130646438613334333839323766323963313337653038316165383166 +3537633331366339363630316131376661616564623135620a623239653938383266653335396335 +64323365313962623639336663363038663335323166363035326437356264646334613931373962 +3062653034303538610a343938633035393465323231616664626532393136643431633131643864 +30316565353136323566336464313865343565346539306533383739636230653336663831313765 +65623334646261613137383230626362323336376436633463383166653865303666633363303131 +38393664383361393262306639306463343664306230626266316462663436376163386262303663 +33623831626237643635306363663237656261323561393834383066623830336538653938663262 +37303437393636313063653761316138336535623266366262613938623238326139 diff --git a/baserock_webserver/instance-gitlab-bot-config.yml b/baserock_webserver/instance-gitlab-bot-config.yml deleted file mode 100644 index aac522a7..00000000 --- a/baserock_webserver/instance-gitlab-bot-config.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Instance-specific configuration for the BuildStream Gitlab IRC bot ---- -- hosts: webserver - vars_files: - - gitlab-bot/gitlab_bot_secrets.yml - vars: - - gitlab_to_irc_url: https://gitlab.com/palvarez89/gitlab-to-irc - - gitlab_to_irc_branch: master - - gitlab_to_irc_install_location: /home/fedora/gitlab-to-irc - tasks: - - name: Install Git - dnf: name=git state=latest - become: yes - - - name: Install Node.js - dnf: name=nodejs state=latest - become: yes - - - name: Download gitlab-to-irc sources - git: - repo: "{{ gitlab_to_irc_url }}" - version: "{{ gitlab_to_irc_branch }}" - dest: "{{ gitlab_to_irc_install_location }}" - - - name: Update packages based on package.json to their latest version. - npm: - path: "{{ gitlab_to_irc_install_location }}" - state: latest - - - name: Install bot configuration file - template: - src: gitlab-bot/config.js - dest: "{{ gitlab_to_irc_install_location }}/config.js" - - - name: Install service for the bot - template: src=gitlab-bot/gitlab-bst-bot.service.in dest=/etc/systemd/system/gitlab-bst-bot.service - become: yes - - - name: Restart bot service - service: - name: gitlab-bst-bot - enabled: yes - state: restarted - daemon_reload: yes - become: yes diff --git a/baserock_webserver/instance-gitlabirced-config.yml b/baserock_webserver/instance-gitlabirced-config.yml index fd2e5ec0..1d8ad6e7 100644 --- a/baserock_webserver/instance-gitlabirced-config.yml +++ b/baserock_webserver/instance-gitlabirced-config.yml @@ -2,7 +2,7 @@ --- - hosts: webserver vars_files: - - gitlab-bot/gitlab_bot_secrets.yml + - gitlabirced/gitlab_bot_secrets.yml vars: - gitlabirced_version: 0.2.2 - gitlabirced_conf_folder: /home/fedora/gitlabirced -- cgit v1.2.1