Commit Graph

14 Commits

Author SHA1 Message Date
Florian Müllner
dbc9ebc6ab ci: Look for matching ref in user remote for branch pipeline
We currently only find a matching ref on the same remote in
a merge request pipeline, but not in branch pipelines.

It can occasionally be useful to run a pipeline without opening
a merge request, so try the same remote here as well instead of
just assuming origin.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2814>
2023-07-07 17:28:26 +00:00
Florian Müllner
9e30afe678 ci: Try falling back to stable branch before HEAD
For non-MR pipelines, we check for a matching branch or tag name
in mutter. As we use the same naming policy for stable branches
and branch at about the same time, this works generally fine for
branches.

However for tags, it is less unlikely that there is no matching
tag in mutter, in particularly late in a stable cycle when most
changes are translation updates (which are much rare in mutter
than gnome-shell).

Before falling back to main (which is doomed to fail in that case),
try to guess the correct stable branch based on the tag name.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2293>
2022-07-04 17:47:36 +02:00
Florian Müllner
28f64072ba ci: Fallback to HEAD when checking out branch
... instead of hardcoding origin/master as the default branch.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1914>
2021-07-18 21:45:46 +00:00
Florian Müllner
ad9c2dd817 ci: Use correct variable name
Whoops, the last changes accidentally changed the CI_COMMIT_REF_NAME
variable to something that's not actually defined.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1531>
2020-12-11 15:59:11 +01:00
Florian Müllner
ca0ad6d94b ci: Only fetch history for branch tips
We don't need any history, so we can save a bit of bandwidth by
omitting it, and only fetch the refs we are actually interested in.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1529>
2020-12-11 15:05:46 +01:00
Florian Müllner
3cccd829f2 ci: Fix checking out mutter for tag pipelines
$CI_COMMIT_REF_NAME can be a branch name or a tag, depending on the
pipeline, but our checkout script only deals with the former at the
moment.

Address this by rather than looking for a remote branch name, just
try to fetch the ref like we do for merge request pipelines.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1529>
2020-12-11 14:46:58 +01:00
Florian Müllner
3cf35ce6df ci: Improve checkout script output
We are currently not very good at communicating what's going in,
in particular for non-merge request pipelines where the output
is usually just "Using origin/master instead" (instead of what?).

Improve this by consistently communicate what we are looking for,
whether we found it, and what we end up doing.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1529>
2020-12-11 14:44:07 +01:00
Florian Müllner
fd5989e99a ci: Fix checking out mutter on stable branches
For stable branches, we currently only check out the correct mutter
branch for merge requests. For the regular pipeline, our code to
determine the current shell branch fails because CI runs on a
temporary "pipeline/12345" branch that doesn't exist for mutter.

Switching to the correct gitlab environment variable fixes that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/811
2019-11-06 22:52:38 +00:00
Florian Müllner
ab9710ee7b ci: Improve script output
git-fetch's -q flag doesn't suppress warnings, so it's not a full
replacement of the redirection that was removed in commit 8cefd919.
Shut up the cryptic warning and replace it with a clearer log message
instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/511
2019-04-26 21:32:51 +02:00
Florian Müllner
43cef45229 ci: Try harder to find a matching mutter branch
Depending on how gitlab's CI checks out gnome-shell, the shell branch
may not have a local reference like "gnome-3-32", but only a remote
one like "remotes/origin/gnome-3-32".

Consider that case as well when looking for a corresponding mutter branch.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/511
2019-04-26 21:32:51 +02:00
Florian Müllner
8db4f3c67f ci: Handle merge requests for non-master branches
If we don't find a branch that matches the branch used in the merge
request, we currently fall back to the non-merge-request matching,
i.e. first try the current shell branch, then fall back to master.

This should work for commits to upstream branches, but not for merge
requests to a stable branch. For those, the target branch name is
a better fallback.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/509
2019-04-26 21:32:51 +02:00
Florian Müllner
594a070029 ci: Fix checking out mutter for stable branches
Remote branches always start with the remote itself, so just looking
for "gnome-3-32" etc. won't produce a match.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/509
2019-04-26 21:32:51 +02:00
Florian Müllner
c2e04e3cfa ci: Silence some warnings
... as suggested by Jonas in mutter!548.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/509
2019-04-26 21:32:51 +02:00
Florian Müllner
2d4989e937 ci: Add build stage
So far we are only performing a basic syntax check on javascript
sources; it's time to test the C code as well. As mutter is tightly
coupled, we bite the bullet and build it as well, either using a
matching branch (if it exists), or current master.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/408
2019-02-26 21:08:17 +00:00