This change includes 2 unrelated small fixes to the "PR comment command"
build+test feature:
1. The concurrency group now contains the PR number, ensuring that
builds for multiple PRs can run in parallel. This addresses an issue
in which starting a build on a PR would cancel a running build of
another PR.
2. Post test results to the PR where the build command was issued on.
The add-pr-comment step's condition was not updated when switching
to PR comment commands for starting builds, so the step would only
run if the action was triggered by a PR change event. Since we now
trigger on issue_comment, the step never ran.
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This change updates dispatching of SDK and OS image builds from changes
to a PR to an explicit comment. PRs will only be built if that comment
was added by a member of the Flatcar maintainers team.
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This change is a building block for PR builds triggered by PR commands.
It checks for membership of the commenter in the Flatcar Maintainers
team.
Note that the "issue comment" event (which is also triggered on PR
comments) is only emitted to workflows in the "main" branch. So in order
to test / trigger this workflow, a transient "PR update" event is used,
and the "commenter" user's login is hard-coded for testing.
This will be updated to using the actual commenter's login before merge.
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This change adds a github actions workflow to build a new SDK container
based on an existing SDK container. This can be used for CI testing
intrusive changes that also affect the SDK without bootstrapping a whole
new SDK.
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
git show-ref in check_remote_branch is not working at all, because the
GitHub Actions checkout fetches a git repo with only depth 1 by default.
That means only main branch is available, not any other remote branches.
As a result, git show-ref always fails.
Fix that by checking for remote branches by git ls-remote.
Changelog directory is now located under flatcar scripts, not under
coreos overlay. Fix the location to add correct changelog to the git
commit.
Also use a correct path SDK_OUTER_TOPDIR in cleanup_repo.
In case of a draft PR created first, no CI gets triggered at the time.
So we should trigger CI afterwards when it is being set to a
ready_for_review state.
Build and CI tests should run automatically whenever a pull request is
opened, reopened or updated. On the other hand, it is not necessary to
run build and CI tests on the events ready_for_review and
review_requested.
This change adds markdown output support to tapfile helper.
tap_generate_report() has been refactored to use low-level output
functions to write tests; TAP and markdown output is supported and both
are generated by default. Also, it should be straightforward to add
other output formats by implementing the respective low level print
functions.
The markdown output is now used by run-kola-tests.yaml to generate step
output and, if run from a PR, add a comment with test results to the PR.
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>