-
Notifications
You must be signed in to change notification settings - Fork 28
/
devfile.yaml
90 lines (84 loc) · 3.25 KB
/
devfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
schemaVersion: 2.2.2
metadata:
name: ansible-demo
components:
- name: tooling-container
container:
image: ghcr.io/ansible/ansible-devspaces:latest
memoryRequest: 256M
memoryLimit: 6Gi
cpuRequest: 250m
cpuLimit: 2000m
args: ["tail", "-f", "/dev/null"]
env:
- name: "ANSIBLE_COLLECTIONS_PATH"
value: "~/.ansible/collections:/usr/share/ansible/collections:/projects/ansible-devspaces-demo/collections"
commands:
- id: molecule-create
exec:
label: "1.Molecule: start a test pod for the automation"
commandLine: "source $HOME/.bashrc && molecule create"
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo/collections/ansible_collections/sample_namespace/sample_collection/extensions
group:
kind: run
isDefault: true
component: tooling-container
- id: molecule-list
exec:
label: "2.Molecule: view the test instance that was created"
commandLine: "source $HOME/.bashrc && molecule list"
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo/collections/ansible_collections/sample_namespace/sample_collection/extensions
group:
kind: run
isDefault: true
component: tooling-container
- id: molecule-converge
exec:
label: "3.Molecule: apply the role to the pod"
commandLine: "source $HOME/.bashrc && molecule converge"
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo/collections/ansible_collections/sample_namespace/sample_collection/extensions
group:
kind: run
isDefault: true
component: tooling-container
- id: molecule-verify
exec:
label: "4.Molecule: run the verification against the test pod"
commandLine: "source $HOME/.bashrc && molecule verify"
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo/collections/ansible_collections/sample_namespace/sample_collection/extensions
group:
kind: run
isDefault: true
component: tooling-container
- id: molecule-destroy
exec:
label: "5.Molecule: reset the test pod back to a fresh instance"
commandLine: "source $HOME/.bashrc && molecule destroy"
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo/collections/ansible_collections/sample_namespace/sample_collection/extensions
group:
kind: run
isDefault: true
component: tooling-container
- id: molecule-test
exec:
label: "6.Molecule: run the full molecule test"
commandLine: "source $HOME/.bashrc && molecule test"
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo/collections/ansible_collections/sample_namespace/sample_collection/extensions
group:
kind: run
isDefault: true
component: tooling-container
- id: ansible-navigator
exec:
label: "Ansible-Navigator: Start ansible-navigator"
commandLine: |
if [ ! -d "$HOME/.cache/ansible-navigator" ]; then
mkdir -p "$HOME/.cache/ansible-navigator"
fi
cp /usr/local/lib/python3.11/site-packages/ansible_navigator/data/catalog_collections.py $HOME/.cache/ansible-navigator
ansible-navigator --ee false
workingDir: ${PROJECTS_ROOT}/ansible-devspaces-demo
component: tooling-container
events:
preStop:
- "molecule-destroy"