Project

General

Profile

action #57536

coordination #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 about 2 years ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Infrastructure
Target version:
Start date:
2019-09-30
Due date:
% Done:

0%

Estimated time:
8.00 h
Difficulty:

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 repositoryNew2019-04-24

History

#1 Updated by mkittler about 2 years ago

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

#2 Updated by riafarov about 2 years ago

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

#3 Updated by riafarov about 2 years ago

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

#4 Updated by riafarov about 2 years ago

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

#5 Updated by ybonatakis about 2 years ago

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

#6 Updated by ybonatakis about 2 years 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 about 2 years 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 about 2 years 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 about 2 years ago

  • Status changed from In Progress to Feedback

#10 Updated by riafarov about 2 years 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

#11 Updated by okurz 10 months ago

  • Due date deleted (2019-11-05)

Also available in: Atom PDF