push:artifact
Build and push a code artifact to a Cloud Platform environment
This command builds a sanitized deploy artifact by running composer install, removing sensitive files, and committing vendor directories.
Vendor directories and scaffold files are committed to the build artifact even if they are ignored in the source repository.
To run additional build or sanitization steps (e.g. npm install), add a post-install-cmd script to your composer.json file: https://getcomposer.org/doc/articles/scripts.md#command-events
This command is designed for a specific scenario in which there are two branches or repositories involved: a source branch without vendor files committed, and an artifact branch with them. If both your source and destination branches are the same, you should simply use git push instead.
Usage
acli push:artifact [--dir DIR] [--no-sanitize] [--dry-run] [--no-push] [--no-commit] [--no-clone] [-u|--destination-git-urls DESTINATION-GIT-URLS] [-b|--destination-git-branch DESTINATION-GIT-BRANCH] [-t|--destination-git-tag DESTINATION-GIT-TAG] [-s|--source-git-tag SOURCE-GIT-TAG] [--siteInstanceId [SITEINSTANCEID]] [--] [<environmentId>]
acli push:artifact [<environmentAlias>]
acli push:artifact myapp.dev
acli push:artifact prod:myapp.dev
acli push:artifact 12345-abcd1234-1111-2222-3333-0e02b2c3d470
acli push:artifact 3e8ecbec-ea7c-4260-8414-ef2938c859bc.abcd1234-1111-2222-3333-0e02b2c3d470
acli push:artifact --destination-git-branch=main-build
acli push:artifact --source-git-tag=foo-build --destination-git-tag=1.0.0
acli push:artifact [email protected]:example.git [email protected]:example.git --destination-git-branch=main-build
Arguments
environmentId
Optional
The Cloud Platform environment ID or alias (i.e. an application and environment name optionally prefixed with the realm)
Options
--dir
Required