CI Pipelines
Automate how your app installs dependencies, how it’s build and how to run it. This is the first step to use off-when unused workspaces or production apps.
Last updated
Automate how your app installs dependencies, how it’s build and how to run it. This is the first step to use off-when unused workspaces or production apps.
Last updated
A CI Pipeline simplifies deployments by automating the process of preparing, testing, and running your application. Just define the commands (steps) that need to be executed for each part. These steps will run when you start the pipeline, or when your workspace restarts.The CI Pipeline is organized in three stages. Stages help to keep the deployment process organized by grouping related tasks.
Prepare - Install dependencies and build your code after updates.
Test - Run automated test steps after deployments.
Run - Run your application's server code. Restarts automatically if any crash occurs.
An Arkane Cloud account
An Arkane Cloud workspace
You can set up a specific CI Pipeline for each workspace. Our templates come with a predefined CI Pipeline you can use or adjust to fit your needs.
If you don't have a CI pipeline defined, clicking on CI Pipeline will open a panel with a Define CI Pipeline button in it. Clicking on it will open the configuration editor.
For each stage you can define multiple steps. We recommend providing meaningful names, especially when adding multiple steps per stage. The command can be anything you would otherwise run from a terminal.
If you have a lot of and/or longer commands you’d like to execute, you can also create scripts and have them executed from the CI Pipeline.An example of this can be found in our WordPress template.The Run stage there looks like this:
The start.sh
script looks like this:
Now that the setup is complete navigate to your CI Pipeline to see the steps.
You can select each stage and run it as needed. Whenever you’ve made bigger changes you will likely want to run the prepare stage and, if you defined automated tests, the test stage. The run stage will start your application and, as long as it’s running, will make sure it stays on by restarting automatically on failures. To stop the application server, stop the run stage. Each stage displays its output on the right side of the CI Pipeline panel.
If you intend to create multiple Arkane Cloud workspaces from the same repository, e.g. for staging environments, it can be time saving to add the created ci.yml
to your version control. To do this, simply open a terminal, commit and push the ci.yml file to your remote repository. This way, any newly created workspace will already have a configured CI Pipeline.