diff --git a/.circleci/config.yml b/.circleci/config.yml index c7391e80ecc98c25ac821f30b5f5303aca1a5593..1c7ecb506a51ecd0ecb7e0c5033f8c534e244f54 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ version: 2.1 executors: python: docker: - - image: cimg/python:3.9 + - image: cimg/python:3.10 publisher: docker: - image: quay.io/cloudalchemy/publisher:latest @@ -15,7 +15,6 @@ jobs: steps: - checkout - run: pip install ansible ansible-lint yamllint flake8 - - run: mkdir -p ~/.ansible/roles && ln -s ~/project ~/.ansible/roles/${CIRCLE_PROJECT_REPONAME} - run: ansible-lint - run: yamllint . - run: flake8 @@ -25,25 +24,21 @@ jobs: parameters: ansible: type: string + scenario: + type: string steps: - checkout - setup_remote_docker - - run: mkdir -p ~/.ansible/roles && ln -s ~/project ~/.ansible/roles/${CIRCLE_PROJECT_REPONAME} - - run: pip install "ansible~=<<parameters.ansible >>.0" + - run: pip install "ansible~=<< parameters.ansible >>.0" - run: pip install -r test-requirements.txt - - run: molecule test -s default --destroy always - - run: | - if [[ -d 'molecule/alternative' ]]; then - molecule test -s alternative --destroy always - else - echo 'No alternative test' - fi - - run: | - if [[ -z "${CIRCLE_PULL_REQUEST}" ]] && [[ -d 'molecule/latest' ]]; then - molecule test -s latest --destroy always - else - echo 'Not running latest on PR' - fi + - run: + no_output_timeout: 60m + command: | + if [[ -n "${CIRCLE_PULL_REQUEST}" ]] && [[ '<< parameters.scenario >>' == 'latest' ]]; then + echo 'Not running latest on PR' + else + molecule test -s '<< parameters.scenario >>' --destroy always + fi release: executor: publisher steps: @@ -74,6 +69,12 @@ workflows: ansible: - "2.9" - "2.10" + - "4.10" + - "5.1" + scenario: + - default + - alternative + - latest filters: tags: only: /.*/ diff --git a/molecule/alternative/playbook.yml b/molecule/alternative/playbook.yml index ce050ec4e31dff6bf631a115d34db2648e49d531..ed59c80229aa4bf1a2314806d8e802f7d1f5d339 100644 --- a/molecule/alternative/playbook.yml +++ b/molecule/alternative/playbook.yml @@ -3,7 +3,7 @@ hosts: all any_errors_fatal: true roles: - - ansible-node-exporter + - cloudalchemy.node_exporter pre_tasks: - name: Create node_exporter cert dir file: diff --git a/molecule/default/playbook.yml b/molecule/default/playbook.yml index 1e92855e9700d3ef1023559b2ed1afde16dbf704..0411e1a4ca763b30d5c40dd89ca7d25cffa350f6 100644 --- a/molecule/default/playbook.yml +++ b/molecule/default/playbook.yml @@ -2,6 +2,6 @@ - hosts: all any_errors_fatal: true roles: - - ansible-node-exporter + - cloudalchemy.node_exporter vars: node_exporter_web_listen_address: "127.0.0.1:9100" diff --git a/molecule/latest/playbook.yml b/molecule/latest/playbook.yml index cafcd8d3b50258467d67536d63d1b7058593a56d..7bd28bd60812cc6b842adbcca5d1b3851fe37f60 100644 --- a/molecule/latest/playbook.yml +++ b/molecule/latest/playbook.yml @@ -3,6 +3,6 @@ hosts: all any_errors_fatal: true roles: - - ansible-node-exporter + - cloudalchemy.node_exporter vars: node_exporter_version: latest