Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 11010bd

Browse files
committed
refactor: move schemas to Ansible collection
Schema files for module-config and project-definition are moved from ./schemas/ to ./ansible/schemas/
1 parent 708ca9a commit 11010bd

49 files changed

Lines changed: 7 additions & 686 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-schemas.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
paths:
8-
- schemas/.deploy/**
8+
- .deploy/schemas.stackhead.yml
99
- .github/workflows/deploy-schemas.yml
1010

1111
jobs:
@@ -20,6 +20,6 @@ jobs:
2020
uses: ./actions/deploy
2121
with:
2222
ipaddress: "${{ secrets.IPADDRESS_STACKHEAD_PROD }}"
23-
file: ./schemas/.deploy/schemas.stackhead.yml
23+
file: .deploy/schemas.stackhead.yml
2424
version: next
2525
ssh_privatekey: "${{ secrets.SSH_PRIVATE_KEY_STACKHEAD_PROD }}"

.github/workflows/release/prepare-files.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@
33
# version file
44
echo $1 > VERSION
55
echo $1 > ansible/VERSION
6-
7-
# update schemas in collection
8-
(cd schemas && find . -name "*.json" -exec cp --parents -R '{}' "../ansible/schemas/" ';')

.github/workflows/test-validator.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
branches:
1313
- master
1414
paths:
15-
- schemas/**
15+
- ansible/schemas/**
1616
- .github/workflows/test-validator.yml
1717

1818
jobs:
@@ -24,5 +24,5 @@ jobs:
2424
uses: actions/checkout@v2
2525

2626
- name: Test example file validity
27-
working-directory: schemas
28-
run: ./test.sh
27+
working-directory: ansible/__tests__
28+
run: ./test-schemas.sh
File renamed without changes.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ TEST_FAILED=0
44

55
validate_files()
66
{
7-
SCHEMAFILE="./${1}.schema.json"
8-
EXAMPLE_DIR="examples/${1}"
7+
SCHEMAFILE="../schemas/${1}.schema.json"
8+
EXAMPLE_DIR="../schemas/examples/${1}"
99
echo "### TESTING ${SCHEMAFILE} ... START\n"
1010
printf "Valid %s files should be valid:\n" "${EXAMPLE_DIR}"
1111
for filename in "${EXAMPLE_DIR}"/valid/*; do
@@ -30,7 +30,6 @@ validate_files()
3030

3131
validate_files "project-definition"
3232
validate_files "module-config"
33-
validate_files "cli-config"
3433

3534
if [ $TEST_FAILED -eq 0 ]; then
3635
echo 'All tests succeeded.'

ansible/schemas/cli-config.schema.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

ansible/schemas/examples/cli-config/invalid/cli-no-container.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

ansible/schemas/examples/cli-config/invalid/cli-no-webserver.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

ansible/schemas/examples/cli-config/valid/cli-noplugins.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)