Skip to content

Commit

Permalink
🤖 sync with cloudalchemy/skeleton (SHA: f292081d): Merge pull request #…
Browse files Browse the repository at this point in the history
…11 from cloudalchemy/superq/update_circleci
  • Loading branch information
cloudalchemybot committed Jan 18, 2022
1 parent 0676886 commit 8fd9948
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
35 changes: 18 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -15,7 +15,6 @@ jobs:
steps:
- checkout
- run: pip install ansible ansible-lint yamllint flake8
- run: mkdir -p .cache/roles && ln -s ../.. .cache/roles/${CIRCLE_PROJECT_REPONAME}
- run: ansible-lint
- run: yamllint .
- run: flake8
Expand All @@ -25,25 +24,21 @@ jobs:
parameters:
ansible:
type: string
scenario:
type: string
steps:
- checkout
- setup_remote_docker
- run: ln -s ~/project ~/${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:
Expand Down Expand Up @@ -74,6 +69,12 @@ workflows:
ansible:
- "2.9"
- "2.10"
- "4.10"
- "5.1"
scenario:
- default
- alternative
- latest
filters:
tags:
only: /.*/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ We provide demo site for full monitoring solution based on prometheus and grafan
The preferred way of locally testing the role is to use Docker and [molecule](https://github.com/ansible-community/molecule) (v3.x). You will have to install Docker on your system. See "Get started" for a Docker package suitable to for your system. Running your tests is as simple as executing `molecule test`.

## Continuous Intergation
## Continuous Integration

Combining molecule and circle CI allows us to test how new PRs will behave when used with multiple ansible versions and multiple operating systems. This also allows use to create test scenarios for different role configurations. As a result we have a quite large test matrix which can take more time than local testing, so please be patient.

Expand Down

0 comments on commit 8fd9948

Please sign in to comment.