Deployment

Private components can be deployed in three ways:

  1. The dependency is downloaded during the build, and uploaded to the server later on.
  2. The repository is first deployed to the server, and the dependency is downloaded to the server later on.
  3. The files are deployed to the server, and a webhook is sent informing that the dependency is ready for download.

Deploying submodules and dependencies

Deployment actions can upload the content either from the pipeline filesystem, or just the Git repository.

Tip

Deployment from the filesystem

  • Deploys submodules fetched at the beginning of the pipeline run
  • Deploys dependencies fetched in the build action, together with the artifacts
Tip

Deployment from the repository

  • Deploys submodules fetched at the beginning of the pipeline run
  • Never deploys dependencies or artifacts

Downloading dependencies to server

The first step is deploying the repository using one of the deployment actions (FTP, SFTP, Rsync, Git Push, etc.). Then, you connect to the server and download the dependencies using the SSH action

Image loading...Example pipeline

The action lets you connect to and run commands on the server.

Image loading...SSH action details

Tip
To save time on deployment and dependency download and ensure your application is always up and running, you might want to consider zero-downtime deployment.

Downloading dependencies to server with webhook

The process is very similar to the previous example, except that instead of SSH we use the HTTP Request action to inform the server that a new version is available after the deployment:

Image loading...Example pipeline

Authentication errors in submodules

To ensure that your pipeline run does not fail in the event of an authentication error while fetching submodules, you can check the 'Ignore submodule errors on git pull' option in the pipeline settings.

If the error appears, you will receive a warning in the logs; however, the execution will proceed, and the error won't affect the pipeline's status. To view the logs from fetching submodules, navigate to the pipeline run details:

Image loading...Authentication error

Warning
If you have set the repository as the source, then the authentication error during the submodule fetch will cause the execution to fail during the deployment.

Last modified on Sep 23, 2024