Package: robotframework-roboops
robotframework-roboopsRobot Framework's library for creating, sharing and running DevOps tasks easily and efficiently.Building pipelines with Robot Framework gives developers clear insight what CI/CD steps do
(thanks to keyword based syntax). Allow them to execute pipelines easily also on their own machines
before pushing to repository and waiting for CI/CD tool to take it up.Thanks to nice RFWK reporting it should be easy and fast to follow pipelines and investigate issues.Primarly designed for testers/developers who use Robot Framework.
They often create own python libraries and must maintain them.But it's not limited only to that - you can automate any stuff with it - with syntax you know and reports you love.Featuresuses robotframework for running tasks - see all the benefits of robotframeworkone that brings a lot of benefits are report and log fileskeyword for running commandskeyword for linking artifacts into report metadataany failure makes remaining tasks to fail automatically (skip)others to come - raise your idea!Installation instructionspip install robotframework-roboopsUsageRoboOps is typical Robotframework library - use it as usual robot library.As this library is mainly focused on running tasks instead of tests,
try to use*** Tasks ***instead of*** Test Cases ***in.robotfiles.This repository uses RoboOps for building, testing (and in future deploying) itself.
Seeci.robotfile to see example how to do it.This repository uses github actions - check this out to see how to use it in CI pipeline.Example*** Settings ***LibraryRoboOpsLibraryOperatingSystem*** Variables ***${atest dir}     ${CURDIR}/atest&{install python env}command=poetry install&{unit tests}command=poetry run coverage run --source=RoboOps -m pytest .&{report coverage}command=poetry run coverage report -m --fail-under=80&{generate wheel}command=poetry build&{remove stale roboops package from atest env}command=poetry remove robotframework-roboopscwd=${atest dir}ignore_rc=True&{install atest env}command=poetry installcwd=${atest dir}&{install atest roboops package from whl}command=poetry add ../cwd=${atest dir}*** Tasks ***Unit Test StageRoboops Run Command&{install python env}Roboops Run Command&{unit tests}Create Coverage Report And Save ItBuild Package StageRoboops Run Command&{generate wheel}Acceptance Test StageRoboops Run Command&{remove stale roboops package from atest env}Roboops Run Command&{install atest env}Roboops Run Command&{install atest roboops package from whl}Roboops Run Command&{run atests}[Teardown]Save Acceptance Tests Artifacts*** Keywords ***Create Coverage Report And Save It${coverage}Roboops Run Command&{report coverage}Create Filecoverage.log${coverage.stdout.decode()}Roboops Save File Artifactcoverage.logcoverage.logSave Acceptance Tests ArtifactsRoboops Save File Artifact${atest dir}/log.htmlatest_log.htmlRoboops Save File Artifact${atest dir}/report.htmlatest_report.htmlRoboops Save File Artifact${atest dir}/output.xmlatest_output.xmlRunning testsTest everything (unit tests, acceptance tests, building wheel) by running:robot ci.robotrunning pipeline with docker (using python 3.6)build docker image and run it:docker build -t roboops:latest .
docker run --user $(id -u):$(id -g) --rm -v "${PWD}":/code --env PYTHONPATH=. roboops:latestSecurity considerationsBe aware that secrets provided in environment variables may be logged by Task (e.g. withLogkeyword).So don't provide secrets into steps where .robot file is executed for commits without any reviewers approval.