Skip to content

tercen/workflow_runner_operator

Repository files navigation

Workflow Runner

Set of scripts to test templates against their golden standard runs.

Template & Golden Standard Workflow Setup

1. Create the Template Repo

Create a new project based on the template repository.

2. Import the repository into Tercen

Create a new project from Github.

New Project

New Project from Git

3. Create the Template Workflow

Create a standard Tercen workflow. Run the steps as needed.

A finalized workflow might look like the one below.

Completed Workflow

4. Clone and Rename

Clone the workflow to create the golden standard. Rename it with an unique _gs suffix (see naming convention).

Clone Workflow

Clone Workflow Name

Once cloned, both Template and Golden Standard will be in the same folder. We want to move the Golden Standard workflow to a folder named tests. To do so, rename the Golden Standard, adding tests/ before the name and pressing the Ok button.

Rename

Rename

5. Reset the Template Workflow

Open the Template Workflow (the one without the _gs** suffix), reset and save it.

6. Commit the Changes to Github

Finally, select the Git button.

Git Function

Then, add any desired commit message, your personal Github token and press Ok.

Git Function

Naming Convention

A Template workflow is compared to its Golden Standard workflows based on a naming convention.

A workflow is considered a Golden Standard if its name ends with _gs*, where * is a set of letter and numbers. For example, Template_gs1, Template_gsA01 and Template_gsAA are all valid Golden Standard names, whereas Template_gs_01 is not.

A Template and a Golden Standard are considered match if they have the same base name, that is, everything before the _gs suffix. For example, Workflow, Workflow_gs01 and Workflow_gs02 refer to a template (Workflow) and its two Golden Standards.

CLI Execution

The workflow runner is contained within a docker and can be called like the example below, containing all mandatory (in bold) and optional arguments:

docker run -t --net=host tercen/workflow_runner:latest   
--templateRepo=tercen/git_project_test
 --branch=main --tag=1.0.0 --gitToken=token
 [--taskId='' --token='' | --user='test' --passw='']
 --serviceUri=http://127.0.0.1:5400 --opMem="500000000" 
 --toleranceType=relative --tolerance=0.001
 --update_operator --quiet --report

Connection & Credentials

PARAMETER DEFAULT VALUE DESCRIPTION
user test Tercen username
passw test Tercen password
token - Authorization token to be used instead of password
gitToken - Authorization token to be used when connecting to github
serviceUri http://127.0.0.1:5400 Tercen URI where the runner will execute the tests

Template & Golden Standard

PARAMETER DEFAULT VALUE DESCRIPTION
templateRepo - Github template repository (e.g. tercen/workflow_lib)
branch main Github template repository branch
tag - Tag or commit hash string

Other parameters

PARAMETER DEFAULT VALUE DESCRIPTION
quiet - Switch. If present, suppress information messages.
update_operator - Switch. If present, check and updates operator version by latest release.
report - Switch. If present, runs in report mode (see below).

Operator Mode

The workflow runner can be executed as an operator within a workflow. The operator will perform the tests for each set of repository, branch and version found in the input.

Factor name must be as indicated in the table below.

Input Projection (Column Factors)

| FACTOR | | DESCRIPTION | | ---------- | ---------- |
| repository | - | Github template repository (e.g. https://github.com/tercen/workflow_lib) | | branch | main | Github template repository branch (e.g. main) | | version | - | Tag or commit hash string (e.g. 1.0, blank or commit identifier) |

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published