#38 add support to release_branch as ansible variable
Merged 4 years ago by psss. Opened 4 years ago by bgoncalv.
fedora-ci/ bgoncalv/docs update-sti  into  master

@@ -209,6 +209,8 @@ 

  . MUST execute Ansible with inventory set to the full path of the file or directory `tests/inventory` if it exists.

  .. If the `tests/inventory` file doesn't exist, then `/usr/share/ansible/inventory` SHOULD be used as a default.

  . MUST execute the playbook as root.

+ . MUST execute the playbook passing `git_branch` as ansible variable.

+ .. The branch used to clone tests*.yml

  . MUST examine the exit code of the playbook. A zero exit code means tests completed successfully, non-zero means a problem with running tests.

  . MUST examine the file `results.yml` in the `artifacts` folder to detect whether tests passed of failed.

  . MUST treat the file `test.log` in the `artifacts` folder as the main readable output of the test.

no initial comment

I think in the STI interface we need to describe the purpose of the variable not the content of it.

THe fact that this branch is mapped to the Fedora release in our pipelines is an implementation details of the pipeline, not STI. So I would say the variable should be just "branch" or "git_branch", and the description is something like "the current git-branch, from which we take tests-*.yml".

rebased onto d80687b

4 years ago

I would rename release_branch to build_target

And take info from Brew/Koji

➜ ~ koji taskinfo 39394170 --verbose
Task: 39394170
Type: build
Request Parameters:
Source: git+https://src.fedoraproject.org/rpms/standard-test-roles.git#1c155deb13d46862374559820c43ccd5a953fc23
Build Target: f31-candidate <-------------------- this

~ koji buildinfo standard-test-roles-4.5-3.fc31
BUILD: standard-test-roles-4.5-3.fc31 [1418221]
State: COMPLETE
Built by: astepano
Source: git+https://src.fedoraproject.org/rpms/standard-test-roles.git#1c155deb13d46862374559820c43ccd5a953fc23
Volume: DEFAULT
Task: 39394170 build (f31-candidate, /rpms/standard-test-roles.git:1c155deb13d46862374559820c43ccd5a953fc23)
Finished: Fri, 29 Nov 2019 10:27:55 CET
Tags: f31-updates < ----------- or this

Keep in mind that tags can have additional set of auxiliary tag names.

https://fedoraproject.org/wiki/Using_the_Koji_build_system#Building_with_fedpkg_targets

Why? Because branch name says nothing. I can send .srpm for build, I can use one branch and build for other target.

Yes, we can go with the above approach, but it will be very limited and suitable only for NVR builds.

thanks for the review, I've changed to use git_branch based on branch used to clone tests*.yml repo.

Is it okay now?

I would add words: for NVR builds.
Scratch build can be sent without git_branch.
And after that +1

for scratch builds we still get the tests.yml from a branch that is the branch we will set git_branch to

hm, ok anyway we can correct the paragraph later. +1

Pull-Request has been merged by psss

4 years ago
Metadata