-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for ansible-builder v3 schema
Signed-off-by: Ajinkya Udgirkar <ajinkyaudgirkar@gmail.com>
- Loading branch information
Showing
3 changed files
with
292 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,309 @@ | ||
{ | ||
"$id": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/execution-environment.json", | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"additionalProperties": false, | ||
"description": "See https://docs.ansible.com/automation-controller/latest/html/userguide/ee_reference.html", | ||
"examples": ["execution-environment.yml"], | ||
"properties": { | ||
"additional_build_steps": { | ||
"properties": { | ||
"append": { | ||
"examples": ["RUN cat /etc/os-release"], | ||
"type": ["string", "array"] | ||
}, | ||
"prepend": { | ||
"examples": ["RUN cat /etc/os-release"], | ||
"type": ["string", "array"] | ||
"$defs": { | ||
"TYPE_DictOrStringOrListOfStrings": { | ||
"anyOf": [ | ||
{ "type": "object" }, | ||
{ "type": "string" }, | ||
{ | ||
"items": { | ||
"type": "string" | ||
}, | ||
"type": "array" | ||
} | ||
}, | ||
"title": "Commands to append or prepend to container build process.", | ||
"type": "object" | ||
] | ||
}, | ||
"ansible_config": { | ||
"examples": ["ansible.cfg"], | ||
"title": "Ansible configuration file", | ||
"type": "string" | ||
"TYPE_StringOrListOfStrings": { | ||
"anyOf": [ | ||
{ "type": "string" }, | ||
{ | ||
"items": { | ||
"type": "string" | ||
}, | ||
"type": "array" | ||
} | ||
] | ||
}, | ||
"build_arg_defaults": { | ||
"additionalProperties": true, | ||
"v1": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"EE_BASE_IMAGE": { | ||
"additional_build_steps": { | ||
"properties": { | ||
"append": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["RUN cat /etc/os-release"] | ||
}, | ||
"prepend": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["RUN cat /etc/os-release"] | ||
} | ||
}, | ||
"title": "Commands to append or prepend to container build process.", | ||
"type": "object" | ||
}, | ||
"ansible_config": { | ||
"examples": ["ansible.cfg"], | ||
"title": "Ansible configuration file", | ||
"type": "string" | ||
}, | ||
"build_arg_defaults": { | ||
"additionalProperties": true, | ||
"properties": { | ||
"EE_BASE_IMAGE": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"dependencies": { | ||
"description": "Allows adding system, python or galaxy dependencies.", | ||
"properties": { | ||
"galaxy": { | ||
"examples": ["requirements.yml"], | ||
"markdownDescription": "Example `requirements.yml`", | ||
"title": "Optional galaxy file", | ||
"type": "string" | ||
}, | ||
"python": { | ||
"examples": ["requirements.txt"], | ||
"markdownDescription": "Example `requirements.txt`", | ||
"title": "Optional python package dependencies", | ||
"type": "string" | ||
}, | ||
"system": { | ||
"examples": ["bindep.txt"], | ||
"markdownDescription": "Example `bindep.txt`", | ||
"title": "Optional system dependencies using bindep format", | ||
"type": "string" | ||
} | ||
}, | ||
"title": "Dependencies", | ||
"type": "object" | ||
}, | ||
"version": { | ||
"enum": [1], | ||
"title": "Version", | ||
"type": "integer" | ||
} | ||
}, | ||
"required": ["version", "dependencies"], | ||
"title": "Ansible Execution Environment Schema v1", | ||
"type": "object" | ||
}, | ||
"dependencies": { | ||
"description": "Allows adding system, python or galaxy dependencies.", | ||
"v3": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"galaxy": { | ||
"examples": ["requirements.yml"], | ||
"markdownDescription": "Example `requirements.yml`", | ||
"title": "Optional galaxy file", | ||
"type": "string" | ||
"additional_build_files": { | ||
"description": "Describes files to add to the build context", | ||
"items": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"dest": { | ||
"description": "Relative subdirectory under build context to place file", | ||
"type": "string" | ||
}, | ||
"src": { | ||
"description": "File to add to build context", | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["src", "dest"], | ||
"type": "object" | ||
}, | ||
"type": "array" | ||
}, | ||
"python": { | ||
"examples": ["requirements.txt"], | ||
"markdownDescription": "Example `requirements.txt`", | ||
"title": "Optional python package dependencies", | ||
"type": "string" | ||
"additional_build_steps": { | ||
"properties": { | ||
"append_base": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["RUN cat /etc/os-release"] | ||
}, | ||
"append_builder": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["RUN cat /etc/os-release"] | ||
}, | ||
"append_final": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["RUN cat /etc/os-release"] | ||
}, | ||
"append_galaxy": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["RUN cat /etc/os-release"] | ||
}, | ||
"prepend_base": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["RUN cat /etc/os-release"] | ||
}, | ||
"prepend_builder": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["RUN cat /etc/os-release"] | ||
}, | ||
"prepend_final": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["RUN cat /etc/os-release"] | ||
}, | ||
"prepend_galaxy": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["RUN cat /etc/os-release"] | ||
} | ||
}, | ||
"title": "Commands to append or prepend to container build process.", | ||
"type": "object" | ||
}, | ||
"system": { | ||
"examples": ["bindep.txt"], | ||
"markdownDescription": "Example `bindep.txt`", | ||
"title": "Optional system dependencies using bindep format", | ||
"type": "string" | ||
"build_arg_defaults": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"ANSIBLE_GALAXY_CLI_COLLECTION_OPTS": { | ||
"type": "string" | ||
}, | ||
"ANSIBLE_GALAXY_CLI_ROLE_OPTS": { | ||
"type": "string" | ||
}, | ||
"PKGMGR_PRESERVE_CACHE": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"dependencies": { | ||
"description": "Allows adding system, python or galaxy dependencies.", | ||
"properties": { | ||
"ansible_core": { | ||
"additionalProperties": false, | ||
"description": "Ansible package installation", | ||
"oneOf": [{ "required": ["package_pip"] }], | ||
"properties": { | ||
"package_pip": { | ||
"description": "Ansible package to install via pip", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"ansible_runner": { | ||
"additionalProperties": false, | ||
"description": "Ansible Runner package installation", | ||
"oneOf": [{ "required": ["package_pip"] }], | ||
"properties": { | ||
"package_pip": { | ||
"description": "Ansible Runner package to install via pip", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"galaxy": { | ||
"$ref": "#/$defs/TYPE_DictOrStringOrListOfStrings", | ||
"examples": ["requirements.yml"], | ||
"markdownDescription": "Example `requirements.yml`", | ||
"title": "Optional galaxy file" | ||
}, | ||
"python": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["requirements.txt"], | ||
"markdownDescription": "Example `requirements.txt`", | ||
"title": "Optional python package dependencies" | ||
}, | ||
"python_interpreter": { | ||
"additionalProperties": false, | ||
"description": "Python package name and path", | ||
"properties": { | ||
"package_system": { | ||
"description": "The python package to install via system package manager", | ||
"type": "string" | ||
}, | ||
"python_path": { | ||
"description": "Path to the python interpreter", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"system": { | ||
"$ref": "#/$defs/TYPE_StringOrListOfStrings", | ||
"examples": ["bindep.txt"], | ||
"markdownDescription": "Example `bindep.txt`", | ||
"title": "Optional system dependencies using bindep format" | ||
} | ||
}, | ||
"title": "Dependencies", | ||
"type": "object" | ||
}, | ||
"images": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"base_image": { | ||
"name": { | ||
"examples": [ | ||
"registry.redhat.io/ansible-automation-platform-21/ee-minimal-rhel8:latest" | ||
], | ||
"type": "string" | ||
}, | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"options": { | ||
"additionalProperties": false, | ||
"description": "Options that effect runtime behavior", | ||
"properties": { | ||
"container_init": { | ||
"additionalProperties": false, | ||
"description": "Customize container startup behavior", | ||
"properties": { | ||
"cmd": { | ||
"description": "literal value for CMD Containerfile directive", | ||
"type": "string" | ||
}, | ||
"entrypoint": { | ||
"description": "literal value for ENTRYPOINT Containerfile directive", | ||
"type": "string" | ||
}, | ||
"package_pip": { | ||
"description": "package to install via pip for entrypoint support", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"package_manager_path": { | ||
"description": "Path to the system package manager to use", | ||
"type": "string" | ||
}, | ||
"relax_passwd_permissions": { | ||
"description": "allows GID0 write access to /etc/passwd; currently necessary for many uses", | ||
"type": "boolean" | ||
}, | ||
"skip_ansible_check": { | ||
"description": "Disables the check for Ansible/Runner in final image", | ||
"type": "boolean" | ||
}, | ||
"user": { | ||
"description": "Sets the username or UID", | ||
"type": "string" | ||
}, | ||
"workdir": { | ||
"description": "Default working directory, also often the homedir for ephemeral UIDs", | ||
"type": ["string", "null"] | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"version": { | ||
"enum": [3], | ||
"title": "Version", | ||
"type": "integer" | ||
} | ||
}, | ||
"title": "Dependencies", | ||
"required": ["version", "dependencies"], | ||
"title": "Ansible Execution Environment Schema v3", | ||
"type": "object" | ||
}, | ||
"version": { | ||
"enum": [1], | ||
"title": "Version", | ||
"type": "integer" | ||
} | ||
}, | ||
"required": ["version", "dependencies"], | ||
"title": "Ansible Execution Environment Schema", | ||
"type": "object" | ||
"$id": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/execution-environment.json", | ||
"$schema": "http://json-schema.org/draft-07/schema", | ||
"description": "See https://docs.ansible.com/automation-controller/latest/html/userguide/ee_reference.html", | ||
"examples": ["execution-environment.yml"], | ||
"oneOf": [{ "$ref": "#/$defs/v3" }, { "$ref": "#/$defs/v1" }], | ||
"title": "Ansible Execution Environment Schema v1/v3" | ||
} |