Skip to main content
Version: Torizon OS 6.x.y

Workspace - Tasks

Introduction

This article explains the automation tasks provided by the Torizon IDE Extension, 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 describes all the inputs that the tasks require. If a task is not asking for an input, it means that the input has its 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 Test Release Container Images

The run-container-torizon-release-<arch> task will:

  1. Build the application based on the production Dockerfile.
  2. Push the container to the local registry (localhost:5002).
  3. Pull the container on the board.
  4. Run the application on the board, showing the output on the VSCode terminal. Learn more on the Build and Test Release Container Images article.

Prepare your Application Container for Production

The create-production-image task performs this action. Learn more on the Prepare your Application Container for Production article.

Build and Push Applications to Torizon Cloud

The tcb-platform-publish task performs this action. Learn more on the Build and Push Applications to Torizon Cloud 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 Cloud 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 Cloud Fleet name to update: This is the name of the fleet that will receive the update trigger. You can create and get the fleet name from the Torizon Cloud.
  • Torizon Cloud API v2 Client ID: the Torizon Cloud API v2 Client ID to use to authenticate in the Torizon Cloud API v2. You can get it creating a new API Client in the Torizon Cloud. Check the Creating a New Torizon Cloud API v2 Client documentation for more information.
  • Torizon Cloud API v2 Client Secret: the Torizon Cloud API v2 Client Secret to use to authenticate in the Torizon Cloud API v2. You can get it creating a new API Client in the Torizon Cloud. Check the Creating a New Torizon Cloud 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.

caution

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 template specific documentation in a new tab. It opens the .doc/README.md shows it using the VS Code markdown preview.



Send Feedback!