Commit Graph

26 Commits

Author SHA1 Message Date
mprahl
c81cd7c964 Support git+https:// git URLs 2017-11-23 14:20:37 -05:00
mprahl
df5b9ab04a Ignore entries in "git ls-remote" with "refs/remotes/origin/" 2017-11-17 11:35:35 -05:00
mprahl
0e031dd850 Fix verifying a commit hash in "scm.get_latest"
The current implementation requires the command to be run on a git repo and
it seems to only work after running a git fetch without dry-run option first.
2017-11-13 09:20:20 -05:00
mprahl
1622494b17 Replace the name of the "branch" parameter in "scm.get_latest" to "ref" 2017-11-13 09:20:20 -05:00
mprahl
d1548a7049 Iterate over git ls-remote output only once 2017-11-13 09:20:20 -05:00
Martin Curlej
bf2369e8e0 Fixed issue with getting the latest ref
Signed-off-by: Martin Curlej <mcurlej@redhat.com>
2017-11-09 12:47:08 +01:00
mprahl
6fc5a6c9b1 Clean up error message in get_module_yaml 2017-11-06 09:18:40 -05:00
mprahl
e91f4fdea6 Revert "added git option which will return correct return code"
This caused an issue when the modulemd had the ref's for its components
as commit hashes instead of branches.

This reverts commit 15f332e60f.
2017-11-03 16:20:33 -04:00
Martin Curlej
60b3d97c97 flake8 cleanup
Signed-off-by: Martin Curlej <mcurlej@redhat.com>

removed some noqa tags
2017-10-25 12:13:59 +02:00
Martin Curlej
15f332e60f added git option which will return correct return code
added tests

fixing typo
2017-10-04 11:44:24 +02:00
Filip Valder
09b3f32dbb Fix #619: Support for module YAML file validation within a SCM repository 2017-08-07 13:10:53 +02:00
Filip Valder
7ef2975984 PEP8 fixes 2017-07-17 18:29:10 +02:00
Nils Philippsen
ec2be36d6e pep8: don't surround '=' with spaces for keyword args 2017-04-21 12:54:06 +02:00
Filip Valder
a192dab1e2 return Unprocessable Entity in case of a commit hash which is not found within the repository 2017-04-10 16:41:24 +02:00
Patrick Uiterwijk
a4763ee316 Use the 403 Forbidden result in case the user is unauthorized
The difference between 401 Unauthorized and 403 Forbidden is that 403 Forbidden is "permanent":
it indicates that the user was authenticated correctly, but was not allowed to access this endpoint.
In contrast, 401 Unauthorized means that the request as posted was not allowed, but if the user
were to try again with (new) authorization tokens, it might actually succeed.

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-03-13 07:34:36 +00:00
Jan Kaluza
4b3e295e48 Expect 'branch' while handling submission of module and use it to set the stream of module. Also verify that the commit hash belongs to that branch. 2017-03-07 11:25:06 +01:00
Matt Prahl
a5cc4eb280 Add a module's commit hash, scmurl, and the buildrequires' commit hashes, stream, and version in the modulemd 2017-02-21 09:53:05 -05:00
Matt Prahl
770184ed95 Make SCM.get_latest more efficient 2017-02-21 09:32:09 -05:00
Ralph Bean
0ffb1f7e42 Test that we can clone repos with a trailing slash. 2017-02-20 12:44:49 -05:00
Jan Kaluza
008f2c9d29 Make SCM check faster by consolidating two SCM checks to single check executed in ThreadPool. Use 'git checkout' instead of HTTP HEAD request, because it is much faster in Fedora cgit case. 2017-01-11 15:09:49 +01:00
Jan Kaluza
3788bd2d8d Inherit the SCM repository from the parent module to included modules. 2016-12-13 13:24:25 +01:00
Filip Valder
7fcfe05f85 Fix issue #251:
- support for mupltiple SCM URLs (logic was broken when there were more
than one SCM URL in SCMURLS conf. var)

- unsplit-brain handling of SCM URLs between frontend and backend
2016-12-12 13:05:27 +01:00
Jan Kaluza
f7350a395f Allow file:// URLs when building modules locally 2016-11-30 10:33:20 +01:00
Ralph Bean
411da3def5 Resolve component refs on build submission.
Fixes #203.

The modulemd files we had used to all pin the commit hashes of the
components they were pulling in.  We changed this with modulemd-1.0 and
now modules can define their components in terms of their *stream*
(a.k.a. their dist-git *branch*).  This is awesome, and is a big
stepping stone towards greater things.

The problem is that we used to take that git ref literally from the
modulemd and pass it on to koji.  Now that instead we are passing on a
branch name to koji, it falls down.  Koji requires us to send it an
explicit commit hash.

This change takes that branch name and converts it to an explicit commit
hash when the module is first submitted.

Verified that things are working again:
- http://koji.stg.fedoraproject.org/koji/taskinfo?taskID=90084980
2016-11-17 14:49:48 -05:00
Jan Kaluza
966a73251a Add support for modulemd-1.0 backward-incompatible changes like commit being replaced by ref 2016-11-14 15:32:51 +01:00
Matt Prahl
b4082dc551 Rename module from rida to module_build_service
Rename routes from /rida/1/module-builds/ to /module-build-service/1/module-builds/
2016-10-24 10:30:23 -04:00