Skip to content

Commit 090ff0b

Browse files
authored
Merge branch 'master' into add-san-for-self-signed-certs
2 parents 027ff34 + a916226 commit 090ff0b

File tree

8 files changed

+269
-99
lines changed

8 files changed

+269
-99
lines changed

.github/workflows/build.yaml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
# only on merges to master branch
8+
- master
9+
# and version branches, which only include minor versions (eg: v3.4)
10+
- v[0-9]+.[0-9]+
11+
tags:
12+
- v*
13+
pull_request:
14+
type: [opened, reopened, edited]
15+
schedule:
16+
# run every night at midnight
17+
- cron: '0 0 * * *'
18+
19+
jobs:
20+
integration:
21+
name: 'integration - ${{matrix.name}}'
22+
runs-on: ubuntu-latest
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
include:
27+
# note: actions/setup-ruby only allows using a major.minor release of ruby
28+
- ruby: '2.7'
29+
name: 'centos7-stable'
30+
distro: 'centos-7'
31+
repo: 'stable'
32+
- ruby: '2.7'
33+
name: 'centos7-unstable'
34+
distro: 'centos-7'
35+
repo: 'unstable'
36+
- ruby: '2.7'
37+
name: 'centos8-stable'
38+
distro: 'centos-8'
39+
repo: 'stable'
40+
- ruby: '2.7'
41+
name: 'centos8-unstable'
42+
distro: 'centos-8'
43+
repo: 'unstable'
44+
- ruby: '2.7'
45+
name: 'ubuntu18-stable'
46+
distro: 'ubuntu-18'
47+
repo: 'stable'
48+
- ruby: '2.7'
49+
name: 'ubuntu18-unstable'
50+
distro: 'ubuntu-18'
51+
repo: 'unstable'
52+
- ruby: '2.7'
53+
name: 'ubuntu20-stable'
54+
distro: 'ubuntu-20'
55+
repo: 'stable'
56+
- ruby: '2.7'
57+
name: 'ubuntu20-unstable'
58+
distro: 'ubuntu-20'
59+
repo: 'unstable'
60+
env:
61+
DISTRO: '${{ matrix.distro }}'
62+
ST2_REPO: '${{ matrix.repo }}'
63+
steps:
64+
- name: Checkout repository
65+
uses: actions/checkout@v2
66+
- name: Setup Ruby
67+
uses: actions/setup-ruby@v1
68+
with:
69+
ruby-version: '${{ matrix.ruby }}'
70+
- name: Bundle prep
71+
run: |
72+
gem install bundler
73+
bundle -v
74+
rm -f Gemfile.lock
75+
# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
76+
# See https://github.com/puppetlabs/pdk-templates/commit/705154d5c437796b821691b707156e1b056d244f for an example of how this was used"
77+
# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set"
78+
[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION
79+
gem --version
80+
bundle -v
81+
# note: this path is relative to the Gemfile path below
82+
bundle config path vendor/bundle
83+
bundle config without 'system_tests'
84+
# note: using custom gemfile for kitchen tests
85+
bundle config gemfile build/kitchen/Gemfile
86+
bundle lock
87+
# restore cache AFTER doing 'bundle lock' so that Gemfile.lock exists
88+
- uses: actions/cache@v2
89+
with:
90+
# note: this path is the Gemfile + path from above, so it's different than the base level Gemfile cache
91+
path: build/kitchen/vendor/bundle
92+
key: ${{ runner.os }}-${{ matrix.name }}-${{ matrix.ruby }}-gems-integration-v3-${{ hashFiles('**/Gemfile.lock') }}
93+
restore-keys: |
94+
${{ runner.os }}-${{ matrix.name }}-${{ matrix.ruby }}-gems-integration-v3-
95+
- name: Bundle install
96+
run: |
97+
bundle install --jobs $(nproc) --retry 3
98+
- name: Test
99+
run: |
100+
bundle exec kitchen test ${{matrix.distro}} --debug ${{ matrix.name }}
101+
env:
102+
HUBOT_SLACK_TOKEN: ${{ secrets.HUBOT_SLACK_TOKEN }}
103+
104+
slack-notification:
105+
name: Slack notification for failed master builds
106+
if: always()
107+
needs:
108+
- integration
109+
runs-on: ubuntu-latest
110+
steps:
111+
- name: Workflow conclusion
112+
# this step creates an environment variable WORKFLOW_CONCLUSION and is the most reliable way to check the status of previous jobs
113+
uses: technote-space/workflow-conclusion-action@v2
114+
- name: CI Run Failure Slack Notification
115+
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' && github.ref == 'refs/heads/master' }}
116+
env:
117+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
118+
uses: voxmedia/github-action-slack-notify-build@v1
119+
with:
120+
channel: ansible
121+
status: FAILED
122+
color: danger

.travis.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Ansible playbooks to deploy [StackStorm](https://github.com/stackstorm/st2).
44
With over [50+ integrations](https://github.com/StackStorm/st2contrib/tree/master/packs) like GitHub, Docker, Nagios, NewRelic, AWS, Ansible it allows you to wire together your existing infrastructure into complex Workflows with auto-remediation and many more.
55
Aka IFTTT orchestration for Ops.
66

7-
[![Build Status](https://travis-ci.org/StackStorm/ansible-st2.svg?branch=master)](https://travis-ci.org/StackStorm/ansible-st2)
7+
8+
[![Build Status](https://github.com/StackStorm/ansible-st2/actions/workflows/build.yaml/badge.svg)](https://github.com/StackStorm/ansible-st2/actions/workflows/build.yaml)
89
[![Repository deb/rpm](https://img.shields.io/badge/Repository-deb/rpm-blue.svg)](https://packagecloud.io/StackStorm/stable/)
910
[![Join our community Slack](https://stackstorm-community.herokuapp.com/badge.svg)](https://stackstorm.com/community-signup)
1011

build/kitchen/Gemfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source 'https://rubygems.org'
2+
3+
# Gems for kitchen ci
4+
gem 'kitchen-docker'
5+
gem 'kitchen-ansible'
6+
gem 'kitchen-sync'
7+
gem 'test-kitchen'

roles/StackStorm.rabbitmq/tasks/main.yml

Lines changed: 2 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,6 @@
11
---
2-
- name: RabbitMQ on RHEL8 requires module(perl:5.26)
3-
become: yes
4-
shell:
5-
cmd: yum -y module enable perl:5.26
6-
args:
7-
warn: False
8-
when: rabbitmq_on_el8
9-
register: perl_result
10-
changed_when:
11-
- '"Nothing to do" not in perl_result.stdout'
12-
# Disable warning as yum doesn't support enable module
13-
tags: [rabbitmq, skip_ansible_lint]
14-
15-
- name: Install rabbitmy/erlang from packagecloud for RH 8
16-
become: yes
17-
no_log: yes
18-
yum_repository:
19-
name: rabbitmq_erlang
20-
description: rabbitmq_erlang
21-
baseurl: https://packagecloud.io/rabbitmq/erlang/el/{{ ansible_facts.distribution_major_version }}/$basearch
22-
repo_gpgcheck: yes
23-
gpgkey: "https://packagecloud.io/rabbitmq/erlang/gpgkey"
24-
sslcacert: /etc/pki/tls/certs/ca-bundle.crt
25-
metadata_expire: 300
26-
gpgcheck: no
27-
enabled: yes
28-
sslverify: yes
29-
when: rabbitmq_on_el8
30-
tags: rabbitmq
31-
32-
- name: Install latest rabbitmq erlang package on {{ ansible_facts.distribution }}
33-
become: yes
34-
package:
35-
name: erlang
36-
state: present
37-
register: _eltask
38-
retries: 5
39-
delay: 3
40-
until: _eltask is succeeded
41-
when: rabbitmq_on_el8
42-
tags: rabbitmq
43-
44-
- name: Install rabbit from packagecloud for RH 8
45-
become: yes
46-
no_log: yes
47-
yum_repository:
48-
name: rabbitmq-server
49-
description: rabbitmq-server
50-
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el/{{ ansible_facts.distribution_major_version }}/$basearch
51-
repo_gpgcheck: yes
52-
gpgkey: "https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey"
53-
sslcacert: /etc/pki/tls/certs/ca-bundle.crt
54-
metadata_expire: 300
55-
gpgcheck: no
56-
enabled: yes
57-
sslverify: yes
58-
when: rabbitmq_on_el8
2+
- name: Install rabbitmq on {{ ansible_facts.distribution }}
3+
include_tasks: rabbitmq_{{ ansible_os_family | lower }}.yml
594
tags: rabbitmq
605

616
- name: Install latest rabbitmq package on {{ ansible_facts.distribution }}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
- name: apt | Add rabbitmq key
3+
become: yes
4+
apt_key:
5+
keyserver: "hkp://keyserver.ubuntu.com:80"
6+
id: "0A9AF2115F4687BD29803A206B73A36E6026DFCA"
7+
state: present
8+
register: _task
9+
retries: 5
10+
delay: 3
11+
until: _task is succeeded
12+
tags: rabbitmq
13+
14+
- name: Ensure pre-requisites are installed
15+
become: yes
16+
apt:
17+
name: "{{ item }}"
18+
state: present
19+
register: _task
20+
retries: 5
21+
delay: 3
22+
until: _task is succeeded
23+
tags: rabbitmq
24+
loop:
25+
- apt-transport-https
26+
- gnupg
27+
28+
- name: Add launchpad key
29+
become: yes
30+
apt_key:
31+
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0xf77f1eda57ebb1cc
32+
id: "57ebb1cc"
33+
state: present
34+
register: _task
35+
retries: 5
36+
delay: 3
37+
until: _task is succeeded
38+
tags: rabbitmq
39+
40+
- name: apt | Add PackageCloud key
41+
become: yes
42+
apt_key:
43+
url: "https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey"
44+
state: present
45+
register: _task
46+
retries: 5
47+
delay: 3
48+
until: _task is succeeded
49+
tags: rabbitmq
50+
51+
- name: Add erlang repos
52+
become: yes
53+
apt_repository:
54+
repo: "deb http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu {{ ansible_facts.distribution_release|lower }} main"
55+
state: present
56+
tags: rabbitmq
57+
58+
- name: Add rabbitmq repos
59+
become: yes
60+
apt_repository:
61+
repo: "deb https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ {{ ansible_facts.distribution_release|lower }} main"
62+
state: present
63+
tags: rabbitmq
64+
65+
- name: Install latest erlang packages on {{ ansible_facts.distribution }}
66+
become: yes
67+
package:
68+
name: "{{ item }}"
69+
state: present
70+
register: _eltask
71+
retries: 5
72+
delay: 3
73+
until: _eltask is succeeded
74+
tags: rabbitmq
75+
loop:
76+
- erlang-base
77+
- erlang-asn1
78+
- erlang-crypto
79+
- erlang-eldap
80+
- erlang-ftp
81+
- erlang-inets
82+
- erlang-mnesia
83+
- erlang-os-mon
84+
- erlang-parsetools
85+
- erlang-public-key
86+
- erlang-runtime-tools
87+
- erlang-snmp
88+
- erlang-ssl
89+
- erlang-syntax-tools
90+
- erlang-tftp
91+
- erlang-tools
92+
- erlang-xmerl
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
3+
- name: Setup rabbitmy/erlang repo from packagecloud for RH
4+
become: yes
5+
no_log: yes
6+
yum_repository:
7+
name: rabbitmq_erlang
8+
description: rabbitmq_erlang
9+
baseurl: https://packagecloud.io/rabbitmq/erlang/el/{{ ansible_facts.distribution_major_version }}/$basearch
10+
repo_gpgcheck: yes
11+
gpgkey: "https://packagecloud.io/rabbitmq/erlang/gpgkey"
12+
sslcacert: /etc/pki/tls/certs/ca-bundle.crt
13+
metadata_expire: 300
14+
gpgcheck: no
15+
enabled: yes
16+
sslverify: yes
17+
tags: rabbitmq
18+
19+
- name: Setup rabbit repo from packagecloud for RH
20+
become: yes
21+
no_log: yes
22+
yum_repository:
23+
name: rabbitmq-server
24+
description: rabbitmq-server
25+
baseurl: https://packagecloud.io/rabbitmq/rabbitmq-server/el/{{ ansible_facts.distribution_major_version }}/$basearch
26+
repo_gpgcheck: yes
27+
gpgkey: "https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey"
28+
sslcacert: /etc/pki/tls/certs/ca-bundle.crt
29+
metadata_expire: 300
30+
gpgcheck: no
31+
enabled: yes
32+
sslverify: yes
33+
tags: rabbitmq
34+
35+
- name: Install latest erlang package on {{ ansible_facts.distribution }}
36+
become: yes
37+
package:
38+
name: erlang
39+
state: present
40+
register: _eltask
41+
retries: 5
42+
delay: 3
43+
until: _eltask is succeeded
44+
tags: rabbitmq

roles/StackStorm.rabbitmq/vars/main.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)