Artifact deployment
Artifact deployment packages your codebase and pushes it to a remote Git repository. This is commonly used for hosting platforms like Acquia that require pre-built code artifacts.
How it works
When artifact is included in $VORTEX_DEPLOY_TYPES, the deployment script:
- Creates a clean code artifact using Git Artifact
- Applies the
.gitignore.artifactrules to control which files are included - Pushes the artifact to the configured remote repository
- The hosting platform then deploys from that repository
Configuration
Environment variables
| Variable | Required | Default | Location | Description |
|---|---|---|---|---|
VORTEX_DEPLOY_ARTIFACT_GIT_REMOTE | Yes | .env | Remote repository URL for the artifact | |
VORTEX_DEPLOY_ARTIFACT_ROOT | No | Current directory | .env | Root directory for artifact creation |
VORTEX_DEPLOY_ARTIFACT_SRC | No | Current directory | .env | Source directory to package |
VORTEX_DEPLOY_ARTIFACT_DST | No | .artifact | .env | Destination directory for artifact |
VORTEX_DEPLOY_ARTIFACT_GIT_USER_NAME | Yes | CI | Git user name for commits | |
VORTEX_DEPLOY_ARTIFACT_GIT_USER_EMAIL | Yes | CI | Git user email for commits | |
VORTEX_DEPLOY_ARTIFACT_LOG | No | .env | Log file path |
Setup
-
Add
artifactto theVORTEX_DEPLOY_TYPESvariable in your.envfile:.envVORTEX_DEPLOY_TYPES=artifact -
Configure the artifact remote repository:
.envVORTEX_DEPLOY_ARTIFACT_GIT_REMOTE=git@github.com:your-org/your-project-artifact.git -
Add Git user credentials to your CI provider's environment variables:
VORTEX_DEPLOY_ARTIFACT_GIT_USER_NAME="Deployment Bot"
VORTEX_DEPLOY_ARTIFACT_GIT_USER_EMAIL="deploy@example.com"
Artifact file control
The .gitignore.artifact file controls which files are included in or excluded
from the artifact. This file replaces the standard .gitignore in the artifact
repository.
Vortex provides a
pre-configured .gitignore.artifact
that includes all required files for a production Drupal site while excluding
development dependencies.
Customizing the artifact
Edit .gitignore.artifact to add or remove files from the artifact:
# Include compiled assets
!/web/themes/custom/*/dist
# Exclude test files
/tests
/behat.yml
/phpunit.xml
Use cases
- Acquia hosting - Acquia requires code artifacts pushed to their Git repository
- Pantheon hosting - Similar artifact-based deployment model
- Custom hosting - Any platform that deploys from a Git repository
See also
- Git Artifact tool - Detailed documentation on the artifact tool
- Acquia hosting - Acquia-specific deployment configuration