Build commands
build
Command
The build
command is used to construct a package based on the user's system target and properties. There are also options that we will detail.
aiop build {system_target} {params}
system_target
: The system target for which to generate the package.
params
: The compatibility parameters of the system target. These mandatory parameters will vary depending on the playbook and its configurations as defined by the.aiop/inventory_config.yml
configuration file in thecompatibility
field (Learn more).
When running the help command, here are the available options:
usage: aiop build [-h] --args ARGS [ARGS ...] [--destination_path DESTINATION_PATH] [--force] [--zip_pack] [--goto_pack] [--upload UPLOAD [UPLOAD ...]] [--upload_url UPLOAD_URL]
[--upload UPLOAD] [--installer {deb}] [--installer_name INSTALLER_NAME] [--no_verify] [--retries RETRIES] [--no_caching] [-v] [-sll STDOUT_LOG_LEVEL] [-fll FILE_LOG_LEVEL] [-hp]
system_target
Build a package from a playbook. Be aware that the current positionnal arguments are dynamic and corresponds to the compatibility arguments defined in the
playbook.In order to build a package, you need to be at the root folder of the playbook.
positional arguments:
system_target System target for which to create a package
options:
-h, --help show this help message and exit
--compat_args ARGS [ARGS ...]
List of compatibility arguments.
--destination_path DESTINATION_PATH
Path to destination. By default it will be generated in the root of the playbook_path in the .build folder
--force Use destination_path even if it is not empty
--zip_pack Zip the built package (default: False)
--goto_pack Open in the explorer the newly created package (default: False)
--upload UPLOAD [UPLOAD ...]
Upload the generated installer or zipped package to a repository. Requires `--upload_url` option
--upload_url UPLOAD_URL
Upload repository URL. Requires `--upload` option.
--installer {deb} Type of installer to generate
--installer_name INSTALLER_NAME
--no_verify Do not verify the Artifact integrity. It will not betaken into account if `--no_caching` is not set or the Artifact is not in cache.
(default: False, means verifythe artifact integrity)
--retries RETRIES Number of retries when downloading an artifact.One retry means that the download was not successful because of an invalid file integrity
(checksum).This parameter will override [download_retries] in the user configuration file. - default: 3
--no_caching The binaries are copied to the destination folder (not from the cache)
-v, --verbose Force the verbosity of the logs to DEBUG. Thus overriding the verbosity set in the configuration file.
-sll STDOUT_LOG_LEVEL, --stdout_log_level STDOUT_LOG_LEVEL
Sets and overrides the stdoutlog level of the logs.
-fll FILE_LOG_LEVEL, --file_log_level FILE_LOG_LEVEL
Sets and overrides the file_log level of the logs.
-hp, --hide_progress Hide the progress bar.
Options
Option | Description | Default |
---|---|---|
destination_path | Path to the package destination | Root of the playbook path in the .build folder |
force | Delete the folder at destination_path regardless of its contents | False : Does not force creation |
no_caching | Do not use cache to retrieve previously downloaded remote resources | False : Remote resources are copied from cache if available |
no_verify | Do not verify the integrity of the remote resource | False : Verifies the artifact integrity |
installer | Type of installer to generate. You can create one installer per build | |
installer_name | Name of the installer | |
retries | Number of download retries for an artifact. Overrides the user configuration | 3 |
zip_pack | Zip the generated package | False : Does not zip it |
goto_pack | Open file explorer on the generated package | False : Does not open it |
upload | Select the package to upload. It could be zip or deb . It needs the --upload_url option to work. | |
upload_url | package upload URL | |
verbose | Forces logging verbosity to DEBUG for both console and log files. User settings will not be considered. | None : Does not force |
stdout_log_level | Forces logging verbosity in the console to a level. User settings will not be considered. | None : Does not force |
file_log_level | Forces logging verbosity in log files to a level. User settings will not be considered. | None : Does not force |
hide_progress | Hides the generation progress box. | None : Progress is displayed by default |
If you combine the verbose
option with either stdout_log_level
or file_log_level
in the same command, the latter two will not be considered, and the logs will be displayed at a maximum verbosity level.
- For example, if you use
aiop build --verbose --stdout_log_level INFO
, the logs will be displayed atDEBUG
level rather thanINFO
. - Another example, if you want to disable console logs for this build but still use the
--verbose
option:aiop build --verbose --stdout_log_level DISABLED
, the logs will still be displayed atDEBUG
level.
build_all
Command
The build_all
commands is used to construct all the packages from the playbook. The command has the following options:
aiop build_all [--threads THREADS]
It will read the packages.yml
file from the playbook configuration folder .aiop
and build all the packages defined in the file. Please refer to the documentation to learn how to configure the packages.yml
file.
The packages will be generated in parallel using threads to speed up the process. The number of threads can be set using the --threads
option. After the build process, a list of successful and failed packages will be displayed.
The build_all
command will disable the logs in the terminal by default to avoid cluttering the console. The logs in the the log files will still be generated.
When running the help command, here are the available options:
usage: aiop build_all [-h] [--threads THREADS]
Build all the package from the playbook. You need first to have parametrizedthe .aiop/packages.yml. See the documentation https://aiop.io/docs/build_all to know how
to do it.
options:
-h, --help show this help message and exit
--threads THREADS, -t THREADS
Number of threads. Determines the number of parallel package build. Default is 4.
Options
Option | Description | Default |
---|---|---|
threads | Number of threads to use for parallel package building | 4 |
CI-CD
When the command aiop build_all
is invoked in the CI-CD pipeline, a new dynamic pipeline will be created.
Commande build_again
It's possible to run last command with aiop build_again
.
usage: aiop build_again [-h]
Rebuilds with the last build command.
options:
-h, --help show this help message and exit
AIOP will take the last command of aiop build
arguments and replay it again.