Workspace - Tasks
Introduction
This article explains the automation tasks provided by Torizon IDE Extension 2, available in the VS Code Task Runner menu. Other specific tasks can be provided by the templates and are described in their respective documentation.
This documentation describe all the possible inputs that the tasks require. If the task is not asking for some input, it means that the input has their value already stored in the .vscode/settings.json
.
Execute a Task
To execute a tasks click on the item from TASK RUNNER
drop menu list from the VS Code Explorer activity bar:
If you want to change the value of the input, you can change it in the .vscode/settings.json
file or by cleaning the value in the .vscode/settings.json
, then run the task again.
Check the Workspace Settings documentation for more information.
Build and Push the Production Docker Image
The push-release-<arch\>
series of tasks perform this action.
Learn more on the Build and Push Applications article.
Build, Push and Generate the Docker-compose for Production
The create-production-image
task performs this action.
Learn more on the Build and Push Applications article.
Build and Push the Application to Torizon Platform
The tcb-platform-publish
task performs this action.
Learn more on the Build and Push Applications article.
Configure the Project to Run CI Pipelines
The fill-pipeline-settings
task performs this action.
Learn more on the Configure Projects to Run CI Pipelines article.
Update the Project Based on template
The try-update-template
task updates the project with the latest updates from the template.
Learn more on the Updating Project from Template article.
Update a Fleet with Latest Published Version
Use the platform-update-fleet
task.
This task will trigger the update of the fleet in the Torizon Platform with the latest version of the application published to the platform.
Inputs are needed to complete the task and are asked in the start of the task:
Torizon Platform Fleet name to update
: This is the name of the fleet that will receive the update trigger. You can create an get the fleet name from the Torizon Platform.Torizon Platform API v2 Client ID
: the Torizon Platform API v2 Client ID to use to authenticate in the Torizon Platform API v2. You can get it creating a new API Client in the Torizon Platform. Check the Creating a New Torizon Platform API v2 Client documentation for more information.Torizon Platform API v2 Client Secret
: the Torizon Platform API v2 Client Secret to use to authenticate in the Torizon Platform API v2. You can get it creating a new API Client in the Torizon Platform. Check the Creating a New Torizon Platform API v2 Client documentation for more information. This value will be stored as a secret in the VS Code vault.
Check Dependencies Needed by the Project
The check-deps
task, which is automatically executed when the project is opened in VS Code, will check if the dependencies needed to run the project are installed in the host machine. These dependencies are read from the .conf/deps.json
file and are not to be used inside the container, but in the host machine.
If some dependency is not installed, the task will show a message in the terminal tab with the missing ones and will ask to the user if he wants to install them. If the user accepts, the task will try to install the package using the apt
.
Pay attention to the terminal tab your root password may be asked to complete the apt install
.
Show Project documentation
The show-project-documentation
task performs this action.
This task will open the project specific documentation in a new tab. It downloads it from vscode-torizon-templates-documentation repository, as a markdown file, and open it in the VS Code markdown preview.