Commit graph

91 commits

Author SHA1 Message Date
Jordan Petridis
c930a3a229
gitlab/ci_template.yml: Use correct yaml syntax
single quotes in yaml don't escape special charters which
causes the env variable to never be resolved to its proper path.
2018-11-22 12:55:52 +02:00
Thibault Saunier
01beb70022 gitlab: Update the docker image we use
so we have latest fix for gst-build git-update script
2018-11-21 21:27:39 -03:00
Thibault Saunier
2414895a53 build_manifest: Add the "path" attribute to projects
When the local path and the name are different, both have to be
specified, it is now required since we add the '.git' to the name.
2018-11-21 20:37:12 -03:00
Thibault Saunier
10ffa6f1af build_manifest: Add the to repo names to avoid spamming about redirections 2018-11-14 10:55:14 -03:00
Thibault Saunier
10ae6d0326 build_manifest: Never use users 'master' branch for repos we are not explicitely building
People very often do not update them leading to random and weird failures
2018-11-14 10:55:14 -03:00
Thibault Saunier
d8ebbea1f0 build_manifest: Make sure to respect GitLab currently built SHA 2018-11-14 10:14:08 -03:00
Thibault Saunier
12d067f249 Revert "Revert me when merged"
This reverts commit 5cff46553e913e5ab13e63561edaa519a4ca904f.
2018-11-13 14:15:41 -03:00
Thibault Saunier
d02fd933d3 Revert me when merged
Stopping the circular dependency.
2018-11-13 16:51:36 +00:00
Thibault Saunier
0cfe2cee41 gitlab: Handle checking out the right gst-ci branch to call build_manifest 2018-11-13 16:51:36 +00:00
Thibault Saunier
7ede1f54aa Add a simple alpine based Dockerfile for images to build manifest 2018-11-13 16:51:36 +00:00
Thibault Saunier
529764a3d7 gitlab: ci: Run build_manifest tests only if the script changes 2018-11-13 16:51:36 +00:00
Jordan Petridis
48f3063daf
build_manifest.py: Use CI_PROJECT_NAMESPACE instead of GITLAB_USER
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.
2018-11-13 13:20:32 +02:00
Jordan Petridis
e3d2c345b6
ci_template: Update docker image tags 2018-11-12 18:57:42 +02:00
Víctor Manuel Jáquez Leal
1858a709e6 ci_template.yml: enable gstreamer-vaapi 2018-11-12 16:04:13 +00:00
Víctor Manuel Jáquez Leal
d1b80b835b build_manifest.py: Add gstreamer-vaapi 2018-11-12 16:04:13 +00:00
Víctor Manuel Jáquez Leal
8cb78a4c38 docker: Add gstreamer-vaapi dependencies 2018-11-12 16:04:13 +00:00
Jordan Petridis
2ec33592e9
CI: Use the correct bash syntax
345afee677 broke the bash
extreppsion that evaluates the strings, causing images to
never be pushed.
2018-11-12 18:01:00 +02:00
Jordan Petridis
b335b4416b
build_manifest.py: Silence irrelevant logs
The group API querries where removed in 2320cfaf but the
log was forgotten.

The headers print was meant to be just for debugging.
2018-11-12 16:51:22 +02:00
Jordan Petridis
8fbce56d69
CI: Change the push policy of the docker images
If we are in a fork of the project, we would like to be able
to overwrite the `:latest` tag if the registry from any branch
so we won't have to manually overwrite the image tag in the
build/test jobs in the .gitlab-ci.yml file
2018-11-12 15:54:23 +02:00
Jordan Petridis
345afee677
CI: Overwrite the build job from the template
Make it so when we build a new image in `gst-ci` it gets
picked up automatically by the job in this repo. For the template
itself we want the images to me be versioned and reproducible.
2018-11-12 15:54:23 +02:00
Nicolas Dufresne
64e3b154cd gitlab-ci: Only run scripts test on related code
Right now we only have one test against build_manifest.py, it
is not needed to run this test if that code haven't changed.
It's really easy to add more file or set a wild card in the
future.
2018-11-10 20:35:10 -05:00
Nicolas Dufresne
ba98b4138a gitlab-ci: Use quote for "test" stage
This is just for consistency, no really needed.
2018-11-10 20:34:21 -05:00
Thibault Saunier
8b34f1e9f6 Also run the main CI template in .gitlab-ci.yml
Rename some job otherwise some names where too similare.
2018-11-09 20:45:08 -03:00
Jordan Petridis
6ddb35c3c4
ci_template.yml: Temporarly disable builddir artifact
We won't use it till the tests land, and the fd.o runners are
getting overloading causing jobs to fail with 500 error during
artifact upload. [1]

Thus disable this feature temporarly.

[1]: https://gitlab.freedesktop.org/freedesktop/freedesktop/issues/44
2018-11-09 21:29:41 +02:00
Jordan Petridis
ece0ea97bf
Add an initial template of a gitlab-ci config
This is meant to be used with the `include:` featrue of gitlab [1]
in order to provide the same CI pipeline for all the gstreamer
modules.

[1] https://docs.gitlab.com/ce/ci/yaml/README.html#include
2018-11-09 16:22:10 +02:00
Edward Hervey
7a51b846f5 build-manifest: Remove reference to anongit
And make the gitlab one the "origin"
2018-11-09 14:08:17 +00:00
Jordan Petridis
9e0abc3c3b
docker: Use the upstream registry to build images 2018-11-09 15:05:38 +02:00
Jordan Petridis
dcbd3f91d4
Do not hardcode env variables 2018-11-08 20:50:13 +02:00
Jordan Petridis
17e6d06735
Docker Fedora: Add more dependencies
Also make the indentation 4-space widgth and consinstant
2018-11-08 20:50:13 +02:00
Jordan Petridis
d9604ca8d2
Build the docker images and push them to the gitalb registry 2018-11-07 16:15:43 +02:00
Thibault Saunier
2c1531ab57
Remove autotools support and update meson.
This simplifies our docker images and we should focus on meson
support for our new CI system!
2018-11-07 16:15:43 +02:00
Thibault Saunier
8ad477eb0e
docker: Add a dockerfile to export test result with allure
based on alpine
2018-11-07 16:15:43 +02:00
Thibault Saunier
778359feb8
docker: Add an archlinux dockerfile 2018-11-07 16:15:43 +02:00
Thibault Saunier
fc8b90123d
docker: ubuntu: Update to 18.04 2018-11-07 16:15:43 +02:00
Thibault Saunier
f1ea83a297
docker: fedora: Update to fedora 29 2018-11-07 16:15:43 +02:00
Jordan Petridis
fa20357221
build_manifest.py: remove get_hostname function
Not really needed anymore now that it just calls urlparse.
2018-11-06 16:25:53 +02:00
Jordan Petridis
9d637f6694
build_manifest.py: Hardcode the project ids of upstream repos.
Since we can't use the group api to query their id, see previous
commit, we are going to hard code the upstream project id for the
time being.
2018-11-06 16:25:53 +02:00
Jordan Petridis
2320cfaffd
build_manifest: Drop the group search for now
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.
2018-11-05 15:18:38 +02:00
Jordan Petridis
7ff131879b
build_manifest.py: Fix the api querries
Previously the script assumed that the best match will be the first
result, but that's not always the case apparently.
2018-11-05 14:41:50 +02:00
Jordan Petridis
39e2ddf788
build_manifest.py: avoid duplicate / in requests 2018-11-05 14:41:50 +02:00
Jordan Petridis
76d38faf20
build_manifest.py: remove request assertion
This does indeed brake things
2018-11-05 14:41:50 +02:00
Jordan Petridis
b5b71baddb
build_manifest.py: Prefer a custom token if set
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.
2018-11-05 14:41:50 +02:00
Jordan Petridis
02b57af288
build_manifest.py: add some basic logging 2018-11-05 14:41:50 +02:00
Jordan Petridis
41a4ca4c8e
build_manifest.py: preserve env vars when running tests
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.
2018-11-05 14:31:52 +02:00
Jordan Petridis
f4d6e7e9c6
build_manifest.py: Avoid duplicating some code 2018-11-05 14:31:52 +02:00
Jordan Petridis
07a1480fc9
build_manifest.py: Avoid making the CI variables global
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.
2018-11-05 14:31:52 +02:00
Jordan Petridis
0fd632e833
CI: run the build_manifest.py tests 2018-11-05 14:31:52 +02:00
Jordan Petridis
2e2864cde7
build_manifest.py: Properly query the group namepsace
Add a function to query groups, so the fallback code will
be functional once gstreamer migrates to gitlab.
2018-11-05 14:31:52 +02:00
Jordan Petridis
490e936dd1
build_manifest.py: Remove an unnecessary if branch
I can't think of a scenario where this would be hit, and can't
trigger make the find_reposiroty_sha function return None either.
2018-11-05 14:31:52 +02:00
Jordan Petridis
64c0e6fba3
build_manifest.py: Remove an early exit branch
find_repository_sha will conclude to the same result so
we can remove the whole if branch and extra variables
that it needed.
2018-11-05 14:31:52 +02:00