-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from CoffeeITWorks/develop
migrate to github actions, improve tests for dev and stable, new OS support
- Loading branch information
Showing
44 changed files
with
545 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
name: Molecule release | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
molecule: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Better to use one scenario per OS for faster performance and easier debugging | ||
scenario: | ||
# - centos-8 | ||
- ubuntu-2004 | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: "${{ github.repository }}" | ||
|
||
- name: Molecule converge | ||
uses: gofrolist/molecule-action@v2 | ||
with: | ||
molecule_options: --debug --base-config molecule/_shared/base.yml | ||
molecule_command: converge | ||
# Always specify scenario and don't use default for better different use cases | ||
molecule_args: --scenario-name ${{ matrix.scenario }} | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
- name: Molecule syntax | ||
uses: gofrolist/molecule-action@v2 | ||
with: | ||
molecule_options: --debug --base-config molecule/_shared/base.yml | ||
molecule_command: syntax | ||
# Always specify scenario and don't use default for better different use cases | ||
molecule_args: --scenario-name ${{ matrix.scenario }} | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
- name: Molecule idempotence | ||
uses: gofrolist/molecule-action@v2 | ||
with: | ||
molecule_options: --debug --base-config molecule/_shared/base.yml | ||
molecule_command: idempotence | ||
# Always specify scenario and don't use default for better different use cases | ||
molecule_args: --scenario-name ${{ matrix.scenario }} | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
|
||
# https://github.com/marketplace/actions/publish-ansible-role-to-galaxy | ||
# Don't forget to add the secret galaxy_api_key in your repository | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- molecule | ||
steps: | ||
- name: galaxy | ||
uses: robertdebock/[email protected] | ||
with: | ||
galaxy_api_key: ${{ secrets.galaxy_api_key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Molecule pipeline test | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- "master" | ||
tags-ignore: | ||
- "*" | ||
pull_request: | ||
pull_request_review: | ||
|
||
jobs: | ||
molecule: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Better to use one scenario per OS for faster performance and easier debugging | ||
scenario: | ||
- centos-8 | ||
- ubuntu-2004 | ||
- stable-ubuntu-1804 | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: "${{ github.repository }}" | ||
|
||
- name: Molecule converge | ||
uses: gofrolist/molecule-action@v2 | ||
with: | ||
molecule_options: --debug --base-config molecule/_shared/base.yml | ||
molecule_command: converge | ||
# Always specify scenario and don't use default for better different use cases | ||
molecule_args: --scenario-name ${{ matrix.scenario }} | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
- name: Molecule syntax | ||
uses: gofrolist/molecule-action@v2 | ||
with: | ||
molecule_options: --debug --base-config molecule/_shared/base.yml | ||
molecule_command: syntax | ||
# Always specify scenario and don't use default for better different use cases | ||
molecule_args: --scenario-name ${{ matrix.scenario }} | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' | ||
- name: Molecule idempotence | ||
uses: gofrolist/molecule-action@v2 | ||
with: | ||
molecule_options: --debug --base-config molecule/_shared/base.yml | ||
molecule_command: idempotence | ||
# Always specify scenario and don't use default for better different use cases | ||
molecule_args: --scenario-name ${{ matrix.scenario }} | ||
env: | ||
PY_COLORS: '1' | ||
ANSIBLE_FORCE_COLOR: '1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
vars: | ||
burpui_standalone: True | ||
burpui_pip_burpui_dev: 'git+https://git.ziirish.me/ziirish/burp-ui.git@master#egg=burp-ui' | ||
burpui_use_dev: True | ||
roles: | ||
# - role: coffeeitworks.burp2_server | ||
- role: ansible_burpui_server | ||
tags: | ||
- burpui-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
options: | ||
ignore-certs: True | ||
ignore-errors: True | ||
role-file: dev_requirements.yml # this file is at the root of the git project same place as molecule is executed | ||
driver: | ||
name: docker | ||
platforms: | ||
|
||
- name: ansible_burpui_server-04 | ||
image: "geerlingguy/docker-centos8-ansible" | ||
command: /sbin/init | ||
privileged: True | ||
pre_build_image: true | ||
capabilities: | ||
- SYS_ADMIN | ||
tmpfs: | ||
- /run | ||
- /tmp | ||
volumes: | ||
- "/sys/fs/cgroup:/sys/fs/cgroup:ro" | ||
groups: | ||
- use_pip_package | ||
|
||
provisioner: | ||
name: ansible | ||
config_options: | ||
defaults: | ||
callback_whitelist: profile_tasks | ||
ssh_connection: | ||
pipelining: true | ||
ssh_args: -o ControlMaster=auto -o ControlPersist=60s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
# This is an example playbook to execute Ansible tests. | ||
|
||
- name: Verify | ||
hosts: all | ||
tasks: | ||
- name: Example assertion | ||
assert: | ||
that: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.