Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

Commit 6063e98

Browse files
committed
Update CI
* Update to latest CI config. * Fix up molecule. Signed-off-by: SuperQ <[email protected]>
1 parent 908dfe0 commit 6063e98

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
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 ~/.ansible/roles && ln -s ~/project ~/.ansible/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: mkdir -p ~/.ansible/roles && ln -s ~/project ~/.ansible/roles/${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: /.*/

molecule/alternative/playbook.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
hosts: all
44
any_errors_fatal: true
55
roles:
6-
- ansible-node-exporter
6+
- cloudalchemy.node_exporter
77
pre_tasks:
88
- name: Create node_exporter cert dir
99
file:

molecule/default/playbook.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
- hosts: all
33
any_errors_fatal: true
44
roles:
5-
- ansible-node-exporter
5+
- cloudalchemy.node_exporter
66
vars:
77
node_exporter_web_listen_address: "127.0.0.1:9100"

molecule/latest/playbook.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
hosts: all
44
any_errors_fatal: true
55
roles:
6-
- ansible-node-exporter
6+
- cloudalchemy.node_exporter
77
vars:
88
node_exporter_version: latest

0 commit comments

Comments
 (0)