Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add qa-automation orb #82

Closed
wants to merge 3 commits into from

Conversation

DReigada
Copy link
Contributor

@DReigada DReigada commented May 5, 2020

No description provided.

@DReigada DReigada force-pushed the feature/add-qa-automation-job branch from 9dc7ce9 to 3ca4751 Compare May 5, 2020 16:23
src/jobs/qa-automation-suite.yaml Outdated Show resolved Hide resolved
src/executors/qa-automation.yaml Outdated Show resolved Hide resolved
@DReigada DReigada force-pushed the feature/add-qa-automation-job branch from bcfd248 to 0be70b0 Compare May 5, 2020 16:58
@DReigada DReigada force-pushed the feature/add-qa-automation-job branch from 0be70b0 to 3c29480 Compare May 6, 2020 10:40
Copy link
Contributor

@andreaTP andreaTP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super interesting and nice addition!
A few comments but looks a really nice PR, thanks a lot @DReigada

@@ -0,0 +1,48 @@
parameters:
test_path:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand what this parameter does.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the path to the test suite to run, which is locate inside the docker image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we have a fixed number of possibilities?
can we list them, at least in a comment?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can provide the list:

Dev -> Suite/API/DEV.xml,Suite/WEB/DEV.xml,Suite/WEB/DEV2.xml,Suite/E2E/DEV.xml
Staging -> Suite/API/DEV.xml,Suite/WEB/STAGING.xml,Suite/WEB/STAGING.xml,Suite/E2E/STAGING.xml
Prod -> Suite/API/PROD.xml,Suite/WEB/PROD.xml,Suite/E2E/PROD.xml

Copy link
Contributor Author

@DReigada DReigada May 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New suites can be added, it seems too cumbersome to add them here every time there's a change in the qa-automation repo.

Copy link
Contributor Author

@DReigada DReigada May 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I suggest doing is adding to the description a link to the qa-automation repo, where all files are located

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree into keeping this list in the qa-automation-test repository, and here we keep a link.
Works for you @jonathancarvalheiro ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

up to you, either way I'm good with it 👍

test_path:
description: "The path to the test suite to run"
type: string
project_name:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a fixed number of option I suppose, can we list them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. @medleycodacy @jonathancarvalheiro any idea?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andreaTP Could not be fixed number, since you can create your specific project on RP. But we can suggest or have a default :qa-automation-tests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this parameter should be called possibly:
report_portal_project_name correct?
@jonathancarvalheiro what happens if we set a name that is not "registered" already in RP?
Do we have a little description on how to "create a project" in RP?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave the description in here.
Create a project on RP.

  1. Go to the RP and login with the superadmin user (check Bitwarden for that).
  2. Click on the right top corner in the user options, and select Administrate.
  3. Click on the Add New Project button, and define the project name.

Something like this, @andreaTP ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add that to the docs of the qa-automation repo?
And add a link to there in this description?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes @jonathancarvalheiro but I think @DReigada suggestion stands. please.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do that.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

project_name:
description: "The name of the project in report portal"
type: string
launch_name:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a parameter for report portal? in case I suggest to call it report_portal_name or something alike

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather keep the name and improve the description.
By using this orb you know that you are reporting to report portal, it seems redundant to "report_portal" to the name of the variables

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here some parameters are referring to the qa-automation-test suite itself and other to the RP integration.
At best of my knowledge you can disable the integration with report_portal (@jonathancarvalheiro can you confirm?)
so

By using this orb you know that you are reporting to report portal
is not correct

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not configurable, the only way it's not to set the RP parameters. I'll check if the docker image works without setting the RP parameters.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I checked, and it's mandatory to have the RP parameters defined.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I purpose to leave like it is right now, and when I put this as a configuration, I do a PR in here as well.

description: "The name to give to the test launch"
type: string
default: EXTERNAL_TEST_RUN
launch_description:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment above apply here as well

description: "The description to give to the test launch"
type: string
default: "Automated Tests Ran by CircleCI"
launch_tag:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as well

LAUNCH_NAME: << parameters.launch_name >>
LAUNCH_DESCRIPTION: << parameters.launch_description >>
LAUNCH_TAG: << parameters.launch_tag >>
RP_ENDPOINT: https://reportportal.dev.codacy.org
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this URL should be a parameter, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The report portal URL is always the same, we only have one instance. Making this a parameter seems it will only increase the complexity of the parameters

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think I'm outdated ... we used to have an instance per environment (@jonathancarvalheiro ?).
Since this code is public I don't know if we should keep this url hardcoded here, I think the best is to have it in env variable in the context.
We don't "publicize" our internal infrastructure urls.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andreaTP, no we always had one instance for all environments.
But I agree as using that with an environment variable on the circle ci e.g.
There's some that we have to set on the circle ci in order for this to work:
RP_ENDPOINT; ENCRYPTION_KEY; RP_CIRCLECI_UUID
Could worth to be mentioned.

src/jobs/qa-automation-suite.yaml Outdated Show resolved Hide resolved
src/jobs/qa-automation-suite.yaml Outdated Show resolved Hide resolved
@pedrocodacy
Copy link
Contributor

this has cobwebs already 🕸️

closing since this diverged in so many ways that it would not be helpful to re-start this from this PR

@tfrgoncalves tfrgoncalves deleted the feature/add-qa-automation-job branch February 28, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants