action #57536

action #15132: [saga][epic] Better structure of test plans in main.pm

[functional][y] implement autodeployment of the job group settings to osd

Added by riafarov 6 months ago. Updated 5 months ago.

Status:ResolvedStart date:30/09/2019
Priority:NormalDue date:05/11/2019
Assignee:ybonatakis% Done:

0%

Category:InfrastructureEstimated time:8.00 hours
Target version:QA - future
Difficulty:
Duration: 27

Description

Motivation

I, as a openQA operator =D want to submit changes to the job group yaml and get them automatically deployed to osd.
This also includes part, that yaml should be validated before the deployment and api call result should be validated too.

Suggestions

Here we store our yaml https://gitlab.suse.de/riafarov/qa-sle-functional-y/tree/master/JobGroups

Acceptance criteria

  1. YAML is validated in PR
  2. Return code of api call is processed and reports errors

API description: https://openqa.suse.de/api

This is the api we should use:
+/job_templates_scheduling/id:num

POST    job_templates_schedulingidnum   Updates a job group according to the given YAML template. Test suites are added or modified as needed to reflect the difference to what's specified in the template. The given YAML will be validated and results in an error if it doesn't conform to the schema. Returns a 400 code on error, or a 303 code and the job template id within a JSON block on success.

Job Group id of YaST job group is '129'.


Related issues

Related to openQA Project - action #50675: Commit changes to scheduling YAML to Git repository New 24/04/2019 29/02/2020

History

#1 Updated by mkittler 6 months ago

  • Related to action #50675: Commit changes to scheduling YAML to Git repository added

#2 Updated by riafarov 6 months ago

  • Due date changed from 05/11/2019 to 22/10/2019

#3 Updated by riafarov 6 months ago

  • Description updated (diff)
  • Category set to Infrastructure
  • Status changed from New to Workable
  • Estimated time set to 8.00

#4 Updated by riafarov 6 months ago

  • Due date changed from 22/10/2019 to 05/11/2019

#5 Updated by ybonatakis 6 months ago

  • Status changed from Workable to In Progress
  • Assignee set to ybonatakis

#6 Updated by ybonatakis 6 months ago

To enable implement autodeployment on gitlab needs to enable the pipelines and the shared runners.
The configuration of the jobs are set in .gitlab-ci.yml.
So far i have a pipeline running with the first job passes the verification of the yaml using some python script
next is to trigger the deployment creating an api request. For this purpose https://github.com/os-autoinst/openQA-python-client can be used. this is the next task.

#7 Updated by okurz 6 months ago

What might be helpful to you is to use an image that has the openQA client pre-installed, e.g. as in https://gitlab.suse.de/openqa/scripts/merge_requests/398/diffs#587d266bb27a4dc3022bbed44dfa19849df3044c_4_3

#8 Updated by mkittler 6 months ago

@ybonatakis

So far i have a pipeline running with the first job passes the verification of the yaml using some python script

next is to trigger the deployment creating an api request

When I understand correctly, the YAML is only validated locally. I'd like to note that it is also possible to validate the YAML using the openQA API without immediately submitting it. This would catch more errors, e.g. misspelled test suite names. It works just like the final API call to submit, you just need to add preview=1 to the query parameters.

#9 Updated by ybonatakis 6 months ago

  • Status changed from In Progress to Feedback

#10 Updated by riafarov 5 months ago

  • Status changed from Feedback to Resolved

So problem was that in original MR wrong ids were specified for the job groups SLE 15 id for SLE 12 and vice versa when were extracted as variables. This is fixed now: https://gitlab.suse.de/riafarov/qa-sle-functional-y/pipelines/40585 and https://gitlab.suse.de/riafarov/qa-sle-functional-y/pipelines/40587

Also available in: Atom PDF