Instead of picking the 'slowest build', look at all the deps logs and
pick the commit that is mentioned in the maximum number of deps logs.
In practice, this will either be the newest commit or the previous
commit. If it's not the newest commit, we will warn and use an older
one.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/349>
When the pipeline is based on top of a stable branch, we want
to track that branch isntead of the primary development branch.
This patch makes it so the upstream branch can be specified with
an env var.
part of #11
For non-cerbero builds, pick a cerbero reference for which a build has
completed. This will reduce the number of cache miss, hence reduce the
number of timeouts and slow build we are facing each time cerbero is
updated.
Fixes#16
GITLAB_USER_* variables represent the user *that triggered* the job,
which might not match the user that owns the namespace of the fork.
This happens frequently with rebase, where the one who triggers the
rebase is the one that appears in the GITLAB_USER_* vars.
Instead use the CI_PROJECT_NAMESPACE variable to search the user's
projects. If CI_PROJECT_NAMESPACE has the value of a Group namespace
search_user_namespace returns 404.
Since we can't authenticate with the CI_JOB_TOKEN it needs a
workaroud. Currently it falls back to the upstream repo which is
good enough to get us going.
In order to be able to query the Gitlab Group API we need to be
authenticated. CI_JOB_TOKEN for public jobs has a non-meaningfull
value which does not actually authenticate the Runner to the
intance.
pytest will happily run all the tests in the same proccess,
which means if one mutates an environment variable, the change
will bleed to the rest of the tests.
There are half of the variables compared to what was used before,
and now they are only used once so its not needed for them anymore
to be global.
This allows running the tests without needing to pre-define them
in your local environment, since the ones needed are mocked in the
tests code anyway.
Previously find_repository_sha would do a global search of
all the projects in the gitlab instance. This ports it to
use the user namespace endpoint.
Additionally seems like the else: block never worked.
The project path is what's shown in the url bar, ex
gitlab.example.com/john/gstreamer -> path == gstreamer
The project name is defined in project settings and its just.
Its more common to change the name of a fork than its path.