Skip to content

Commit

Permalink
Fix headings
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-jokic committed Apr 3, 2024
1 parent 25fe692 commit 7febf83
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
6 changes: 1 addition & 5 deletions content/1.workflows/2.expressions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
title: Expressions
---

# Expressions
# Expressions

Expressions are implemented as a limited mechanism where you express when some action should be taken.

Expand Down
14 changes: 6 additions & 8 deletions content/1.workflows/3.templates.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: "Template"
---
# Template

# Motivation
## Motivation

If you have variables that are reoccurring, you may want to store them in a single place, so you can reference them from multiple scans.

Expand All @@ -13,7 +11,7 @@ Other variables are used for dynamic execution. If your workflow depends on the
file. But since the directory is not deterministic, it would be impossible to provide a path to a file. You can leverage workflow template
variables to do just that.

# Template evaluation
## Template evaluation

Each run in the workflow is actually a template string. For each step, template is validated when the workflow is saved. Template validation will verify that you are not using a `job` that does not exist. However, validation skips validating vars, since they can be added or removed at any time.

Expand All @@ -24,11 +22,11 @@ Template consists of 2 parts:

When the scan is scheduled to run on a runner, template is evaluated. From the time when the scan is scheduled, to the time when it runs, user may delete some job. To avoid using stale data, the most recent outputs are used at the time when the job actually runs.

## Context variables
### Context variables

Context variables are selected using `${{}}` syntax. The reason is to avoid having conflicts with shells that are most commonly used. However, template evaluation is currently completely evaluated on the server side, so the runner will receive an expanded shell script. Nevertheless, seeing `${{ var.domain }}` serves as a visual focus point to help you distinguish between shells `${}`, and `${{}}`. It has almost the same semantics, but does not collide with special symbols used by the shell.

### Var
#### Var

Var stands for variable. It is evaluated on the server. You can define as many workflow variables as you would like by visiting your project, and under `Workflow settings` tab,
you will see a list of variables. It is a key-value pair. The key is used as a reference, and the value is the value that will replace that template.
Expand All @@ -47,7 +45,7 @@ steps:
If variable does not exist at the time the workflow needs to be sent to the runner, the workflow will fail.
::
### Job
#### Job
The job context variable allows you to reference another job's successful output. When workflow is parsed, this context variable will evaluate
to the latest successful execution of a job. It is intended to be used to reference a dependency scan.
Expand Down
7 changes: 1 addition & 6 deletions content/1.workflows/4.managing-workflows.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
title: "Managing workflows"
description: "How to manage workflows"
---

## Project workflows
# Project workflows

Each project can have multiple workflows. Each workflow executes on its own schedule. You cannot create dependencies between workflows. If you have any dependencies, they must belong to the same workflow file.

Expand Down

0 comments on commit 7febf83

Please sign in to comment.