Skip to content

Commit 0e2d9d2

Browse files
🤖 sync with cloudalchemy/skeleton (SHA: f292081d): Merge pull request #11 from cloudalchemy/superq/update_circleci
1 parent ab069b4 commit 0e2d9d2

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

.circleci/config.yml

+18-17
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 2.1
44
executors:
55
python:
66
docker:
7-
- image: cimg/python:3.9
7+
- image: cimg/python:3.10
88
publisher:
99
docker:
1010
- image: quay.io/cloudalchemy/publisher:latest
@@ -15,7 +15,6 @@ jobs:
1515
steps:
1616
- checkout
1717
- run: pip install ansible ansible-lint yamllint flake8
18-
- run: mkdir -p .cache/roles && ln -s ../.. .cache/roles/${CIRCLE_PROJECT_REPONAME}
1918
- run: ansible-lint
2019
- run: yamllint .
2120
- run: flake8
@@ -25,25 +24,21 @@ jobs:
2524
parameters:
2625
ansible:
2726
type: string
27+
scenario:
28+
type: string
2829
steps:
2930
- checkout
3031
- setup_remote_docker
31-
- run: ln -s ~/project ~/${CIRCLE_PROJECT_REPONAME}
32-
- run: pip install "ansible~=<<parameters.ansible >>.0"
32+
- run: pip install "ansible~=<< parameters.ansible >>.0"
3333
- run: pip install -r test-requirements.txt
34-
- run: molecule test -s default --destroy always
35-
- run: |
36-
if [[ -d 'molecule/alternative' ]]; then
37-
molecule test -s alternative --destroy always
38-
else
39-
echo 'No alternative test'
40-
fi
41-
- run: |
42-
if [[ -z "${CIRCLE_PULL_REQUEST}" ]] && [[ -d 'molecule/latest' ]]; then
43-
molecule test -s latest --destroy always
44-
else
45-
echo 'Not running latest on PR'
46-
fi
34+
- run:
35+
no_output_timeout: 60m
36+
command: |
37+
if [[ -n "${CIRCLE_PULL_REQUEST}" ]] && [[ '<< parameters.scenario >>' == 'latest' ]]; then
38+
echo 'Not running latest on PR'
39+
else
40+
molecule test -s '<< parameters.scenario >>' --destroy always
41+
fi
4742
release:
4843
executor: publisher
4944
steps:
@@ -74,6 +69,12 @@ workflows:
7469
ansible:
7570
- "2.9"
7671
- "2.10"
72+
- "4.10"
73+
- "5.1"
74+
scenario:
75+
- default
76+
- alternative
77+
- latest
7778
filters:
7879
tags:
7980
only: /.*/

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ You can run the different Cortex modules as separate services by setting
107107

108108
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`.
109109

110-
## Continuous Intergation
110+
## Continuous Integration
111111

112112
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.
113113

0 commit comments

Comments
 (0)