29
loading...
This website collects cookies to deliver better user experience
zef install --/test https://github.com/melezhik/Sparrow6.git
zef install --/test https://github.com/melezhik/Tomty.git
tomty
- Tomty cli application:export SP6_REPO=https://sparrowhub.io/repo
mkdir work
cd work
tomty --init
tomty --completion
task.bash
and located at some directory:mkdir -p tasks/task1/
nano tasks/task1/task.bash
echo "hello world"
tomty --edit my-task
#!raku
task-run "tasks/task1"
task-run
, with a parameter setting a task directory.tomty my-task
[repository] :: index updated from file:///root/repo/api/v1/index
[tasks/task1] :: hello world
nano tasks/task1/task.bash
curl -s -f $(config url) -o /dev/null -D - | head -n 4
curl
command to GET some http URL, pay attention that -f
flag causes curl to exit with none zero exit code in case of receiving none successful http response. tomty --edit my-task
#!raku
task-run "tasks/task1", %(
url => "https://raku.org"
);
tomty my-task
[tasks/task1] :: HTTP/2 200
[tasks/task1] :: date: Fri, 02 Jul 2021 18:20:58 GMT
[tasks/task1] :: content-type: text/html
[tasks/task1] :: last-modified: Tue, 25 May 2021 16:30:03 GMT
config name
is used as function to access named parameters passed to Bash from Raku as a Raku Hash. This semantic works because Tomty is build on top of Sparrow automation tool, that provides all type of such functionality. nano tasks/task1/task.check
HTTP/2 200
tomty my-task
[repository] :: index updated from file:///root/repo/api/v1/index
[tasks/task1] :: HTTP/2 200
[tasks/task1] :: date: Fri, 02 Jul 2021 19:08:34 GMT
[tasks/task1] :: content-type: text/html
[tasks/task1] :: last-modified: Tue, 25 May 2021 16:30:03 GMT
[task check] stdout match <HTTP/2 200> True
nano tasks/task1/task.check
regexp: "HTTP/" 1 || 2 " 200"
--all
parameter of tomty cli:tomty --all
tomty --edit my-task
#!raku
=begin tomty
%(
tags => [ 'offline']
)
=end tomty
task-run "tasks/task1", %(
url => "https://raku.org"
);
tomty --skip=offline
[1/1] / [my-task] ....... SKIP
=========================================
(=: / [1] tests in 0 sec / (0) tests passed
offline
tomty --only=offline+app-v2 --skip=production
tomty --list --tags
tomty --tags --only=offline+app-v2 --skip=production