RedHatQE / teflo

Teflo is a standalone orchestration software that controls the flow of a set of testing scenarios, allowing users to provision machines, deploy software, execute tests against them and manage generated artifacts and report results.
https://teflo.readthedocs.io/en/latest/
GNU General Public License v3.0
14 stars 16 forks source link

RFE: Support teflo command aliases similar to git #164

Closed Dannyb48 closed 2 years ago

Dannyb48 commented 3 years ago

The use case is to be able to have a config section called aliases that would allow a user to specify aliases for their teflo run commands. Similar to git aliases

This would allow teflo commands to be more intuitive, shortened and allow of group tasks together into a single command without explicitly specifying them.

Right now we achieve this by writing lightweight wrapper shell/python scripts that wrap teflo or we utilize tox to provide this in an abstract manner using testenvs

Some examples:

1) Provisioning and Deploying a product with this command teflo run -t validate -t provision -t orchestrate -s <path/to/sdf> -w ./

Aliased to

[aliases]
deploy="run -t validate -t provision -t orchestrate -s <path/to/sdf> -w ./"

[user]$ teflo deploy

2) If I want to deploy a particular product and run integration tests teflo run -t orchestrate -t execute -s <path/to/results.yml> -w ./ -l product-a -l product-a-integration

Aliased to

[aliases]
product-integration="run -t orchestrate -t execute -s <path/to/results.yml> -w ./ -l product-a -l product-a-integration"

[user]$ teflo production-integration

3) Similar to second example but I want to run sanity tests and context switch between running teflo automation against a dev environment vs a production environment teflo run -t validate -t provision -t orchestrate -t execute -s <path/to/sdf> -w ./ -l sanity --vars-data <path/to/dev/vars> teflo run -t validate -t provision -t orchestrate -t execute -s <path/to/sdf> -w ./ -l sanity --vars-data <path/to/prod/vars>

Aliased to

[aliases]
dev-sanity="run -t validate -t provision -t orchestrate -t execute -s <path/to/sdf> -w ./ -l sanity --vars-data <path/to/dev/vars>"
prod-sanity="run -t validate -t provision -t orchestrate -t execute -s <path/to/sdf> -w ./ -l sanity --vars-data <path/to/prod/vars>"

[user]$ teflo dev-sanity
[user]$ eflo prod-sanity
dno-github commented 3 years ago

Jira ticket CCITCARBON-389 has been created for this issue. Url : https://issues.redhat.com/browse/CCITCARBON-389

guyyaakov1 commented 2 years ago

Changes are on develop branch. fix with #249