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

Remove repos property from config.yml #163

Open
samuelbernardolip opened this issue Jun 23, 2021 · 2 comments
Open

Remove repos property from config.yml #163

samuelbernardolip opened this issue Jun 23, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@samuelbernardolip
Copy link
Collaborator

samuelbernardolip commented Jun 23, 2021

Improve current implementation so criteria properties are in accordance with the concepts being represented:

  • projects (software or platforms) -> stages
  • build tools -> steps

So the expected result would allow to change from:

sqa_criteria:
  qc_style:
    repos:
      whatever-project-id:
        commands: [ .. ]

into one of the following representations:

  • in case there is only one project to be tested
sqa_criteria:
  qc_style:
    builders:
      - commands: [ ..]
      - tox: [...]
      - maven: [...]
  • if there is more than one project to test:
whatever-project-id:
  sqa_criteria:
    qc_style:
      builders:
        - commands: [ ..]
        - tox: [...]
        - maven: [...]

@orviz my doubt here is about placing project in the level above criteria, or if project must be a property of the criterion... This approach allows for project dependency, for example:

whatever-project-id1:
  sqa_criteria:
    qc_style:
      builders:
        - commands: [ ..]
        - tox: [...]
        - maven: [...]
whatever-project-id2:
  sqa_criteria:
    qc_style:
      builders:
        - commands: [ ..]
        - tox: [...]
        - maven: [...]
whatever-project-id1-again:
  sqa_criteria:
    qc_style:
      builders:
        - commands: [ ..]
        - tox: [...]
        - maven: [...]

The jenkins stage name will be defined by project id followed by criterion name, in this case are "whatever-project-id1 qc_style", "whatever-project-id2 qc_style" and "whatever-project-id1-again qc_style". In each stage can be run the selected criterion from the set defined for each project.
This is also important thinking in deploy or docker-registry stages, that can be placed in or outside the project itself.

@samuelbernardolip samuelbernardolip added the enhancement New feature or request label Jun 23, 2021
@samuelbernardolip samuelbernardolip added this to the 2.2.0 milestone Jun 23, 2021
@samuelbernardolip samuelbernardolip self-assigned this Jun 23, 2021
@orviz
Copy link
Member

orviz commented Jun 29, 2021

@orviz my doubt here is about placing project in the level above criteria, or if project must be a property of the criterion... This approach allows for project dependency, for example:

whatever-project-id1:
  sqa_criteria:
    qc_style:
      builders:
        - commands: [ ..]
        - tox: [...]
        - maven: [...]
whatever-project-id2:
  sqa_criteria:
    qc_style:
      builders:
        - commands: [ ..]
        - tox: [...]
        - maven: [...]
whatever-project-id1-again:
  sqa_criteria:
    qc_style:
      builders:
        - commands: [ ..]
        - tox: [...]
        - maven: [...]

I see an inconvenience in using the project as a level above the criteria. In your example, I understand that whatever-project-id1-again has to be a duplicate of whatever-project-id1, which makes the pipeline definition more bulky. This duplication is avoided when using the project inside the criterion.

On the other hand, is there any reason to add builders key?

@samuelbernardolip
Copy link
Collaborator Author

I see an inconvenience in using the project as a level above the criteria. In your example, I understand that whatever-project-id1-again has to be a duplicate of whatever-project-id1, which makes the pipeline definition more bulky. This duplication is avoided when using the project inside the criterion.

Yes that is always an issue, even if we place criteria or project outside. The use case was to show a dependency between projects. So suppose that project-id2 depends on the check success of project_id1 for criteria xpto1, and then later project-id1 criteria xpto2 depends on project-id2 to pass all defined checks.
The point is that I find the dependency concept associated with the project and not the criterion itself, that's why I placed project above criteria.

On the other hand, is there any reason to add builders key?

To get builders label as a generic definition, so I can collect the steps to apply into the stage and using an array also allows to repeat the commands or build tools as a step if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants