CI jobs artifacts should not be difficult

melezhik1 pts1 comments

DSCI - [D]ead [S]imple CI

job-artifacts

# Job Artifacts

DSCI dramatically simplify working with artifacts<br>process inside pipelines.

To create artifact file just create it in `~/artifacts/`<br>directory in some task file, for example:

```bash<br>#!/bin/bash

echo "DSCI is cool" > ~/artifacts.txt<br>```

The the next job will see it in the same directory:

```python<br>#!/usr/bin/python3

file_path = Path.home() / "artifacts.txt"

# 2. Read the file safely using a context manager<br>try:<br>with open(file_path, "r", encoding="utf-8") as file:<br>content = file.read()<br>print(content)<br>except FileNotFoundError:<br>print(f"Error: The file at {file_path} was not found.")<br>```

That's it. Artifacts de-facto is any file located in `~/artifacts` dir,

If some job decides to remove a file from `~/artifacts/` it won't be available for the next<br>jobs.

So artifacts works as a pipeline data buffer

artifacts file dsci file_path jobs create

Related Articles