Yaml and Ansible linting in Molecule (#141)
* Removed old ansible-lint outside of molecule * Yamlint * Enabled ansible-lint with minimal rules * Removed ansible-lint job
This commit is contained in:
parent
3f27b98b8b
commit
1da1acbfbe
@ -55,12 +55,6 @@ jobs:
|
||||
- restore_cache:
|
||||
key: initialize-{{ .Environment.CIRCLE_SHA1 }}
|
||||
- run: yarn run lint
|
||||
ansible-lint:
|
||||
docker:
|
||||
- image: particlekit/ansible-lint
|
||||
steps:
|
||||
- checkout
|
||||
- run: ./deployment/lint.sh
|
||||
test:
|
||||
docker:
|
||||
- image: circleci/node:10.15
|
||||
@ -151,7 +145,6 @@ workflows:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
- ansible-lint
|
||||
- oracle-e2e
|
||||
- ui-e2e
|
||||
- monitor-e2e
|
||||
|
@ -76,14 +76,6 @@ Running linter for all JS projects:
|
||||
yarn lint
|
||||
```
|
||||
|
||||
Running linter for all Ansible playbooks:
|
||||
|
||||
- [ansible-lint](https://github.com/ansible/ansible-lint) is required
|
||||
|
||||
```
|
||||
yarn ansible-lint
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
Running tests for all projects:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
## General settings
|
||||
BRIDGE_MODE: "ERC_TO_NATIVE"
|
||||
HOME_NATIVE_NAME: "xDai"
|
||||
@ -14,7 +15,7 @@ FOREIGN_RPC_URL: "https://mainnet.infura.io"
|
||||
FOREIGN_NAME: "Ethereum Mainnet"
|
||||
FOREIGN_WITHOUT_EVENTS: false
|
||||
FOREIGN_BRIDGE_ADDRESS: "0x4aa42145Aa6Ebf72e164C9bBC74fbD3788045016"
|
||||
ERC20_TOKEN_ADDRESS: "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
|
||||
ERC20_TOKEN_ADDRESS: "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
|
||||
FOREIGN_POLLING_INTERVAL: 5000
|
||||
|
||||
## Home Gasprice
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
## General settings
|
||||
BRIDGE_MODE: "NATIVE_TO_ERC"
|
||||
HOME_NATIVE_NAME: "POA"
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
## General settings
|
||||
BRIDGE_MODE: "NATIVE_TO_ERC"
|
||||
HOME_NATIVE_NAME: "ETC"
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
sokol-kovan:
|
||||
children:
|
||||
oracle:
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
cd $(dirname $0)
|
||||
ansible-lint -v -t bug ./oracle/roles/**
|
@ -1,4 +1,5 @@
|
||||
FROM python:3.7-stretch
|
||||
RUN curl -fsSL https://get.docker.com | sh
|
||||
RUN pip3 install docker molecule==2.22rc1 molecule[docker] flake8
|
||||
WORKDIR runner
|
||||
COPY . .
|
||||
|
@ -5,7 +5,10 @@ driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
enabled: False
|
||||
enabled: True
|
||||
options:
|
||||
config-data:
|
||||
ignore: ../../hosts.yml
|
||||
platforms:
|
||||
- name: oracle-host
|
||||
groups:
|
||||
@ -21,7 +24,9 @@ provisioner:
|
||||
name: ansible
|
||||
lint:
|
||||
name: ansible-lint
|
||||
enabled: False
|
||||
enabled: True
|
||||
options:
|
||||
r: ["bug"]
|
||||
playbooks:
|
||||
prepare: prepare.yml
|
||||
converge: ../../site.yml
|
||||
|
@ -7,7 +7,7 @@
|
||||
name: "{{ packages }}"
|
||||
vars:
|
||||
packages:
|
||||
- apt-transport-https
|
||||
- rsyslog
|
||||
- apt-transport-https
|
||||
- rsyslog
|
||||
- shell: service rsyslog start
|
||||
- shell: groupadd docker && chgrp docker /var/run/docker.sock
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: '3.0'
|
||||
services:
|
||||
molecule_runner:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
docker_compose_version: 1.23.2
|
||||
compose_service_user: poadocker
|
||||
bridge_path: "/home/{{ compose_service_user }}/bridge"
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: restart rsyslog
|
||||
service:
|
||||
name: rsyslog
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Install the gpg key for docker
|
||||
apt_key:
|
||||
url: "https://download.docker.com/linux/ubuntu/gpg"
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Set the local docker logs configuration file
|
||||
template:
|
||||
src: 30-docker.conf.j2
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- include_tasks: dependencies.yml
|
||||
- include_tasks: repo.yml
|
||||
- include_tasks: logging.yml
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Get bridge repo
|
||||
git:
|
||||
repo: "{{ bridge_repo }}"
|
||||
|
@ -1,2 +1,3 @@
|
||||
---
|
||||
dependencies:
|
||||
- role: common
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Launch container
|
||||
shell: docker-compose up -d
|
||||
args:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- include_tasks: pre_config.yml
|
||||
- include_tasks: jumpbox.yml
|
||||
- include_tasks: servinstall.yml
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Install .env config
|
||||
template:
|
||||
src: .env.j2
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
bridge_path: "/home/{{ compose_service_user }}/bridge"
|
||||
ALLOW_HTTP: no
|
||||
QUEUE_URL: amqp://rabbit
|
||||
|
@ -1,2 +1,3 @@
|
||||
---
|
||||
dependencies:
|
||||
- role: common
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Launch container
|
||||
shell: docker-compose up -d
|
||||
args:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Slurp docker compose file
|
||||
slurp:
|
||||
src: "{{ bridge_path }}/oracle/docker-compose.yml"
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- include_tasks: pre_config.yml
|
||||
- include_tasks: logging.yml
|
||||
- include_tasks: jumpbox.yml
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Get blocks
|
||||
become_user: "{{ compose_service_user }}"
|
||||
shell: docker-compose run --entrypoint "node scripts/getValidatorStartBlocks.js" bridge_affirmation
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Install .env config
|
||||
template:
|
||||
src: .env.j2
|
||||
|
@ -1,2 +1,3 @@
|
||||
---
|
||||
dependencies:
|
||||
- role: common
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Launch container
|
||||
shell: docker-compose up -d
|
||||
args:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Slurp docker compose file
|
||||
slurp:
|
||||
src: "{{ bridge_path }}/ui/docker-compose.yml"
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- include_tasks: pre_config.yml
|
||||
- include_tasks: logging.yml
|
||||
- include_tasks: jumpbox.yml
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Install .env config
|
||||
template:
|
||||
src: .env.j2
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Install Oracle
|
||||
hosts: oracle
|
||||
become: true
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: '3'
|
||||
services:
|
||||
parity1:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: '2.4'
|
||||
services:
|
||||
monitor:
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: '2.4'
|
||||
services:
|
||||
rabbit:
|
||||
|
@ -35,7 +35,6 @@
|
||||
"build": "yarn workspace ui run build",
|
||||
"lint": "yarn wsrun --exclude poa-parity-bridge-contracts lint",
|
||||
"test": "yarn wsrun --exclude monitor --exclude oracle-e2e --exclude ui-e2e test",
|
||||
"ansible-lint": "./deployment/lint.sh",
|
||||
"oracle-e2e": "./oracle-e2e/run-tests.sh",
|
||||
"ui-e2e": "./ui-e2e/run-tests.sh",
|
||||
"clean": "rm -rf ./node_modules ./**/node_modules ./**/**/node_modules ./**/build",
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
version: '2.4'
|
||||
services:
|
||||
ui:
|
||||
|
Loading…
Reference in New Issue
Block a user