Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible for travis-ci to build forked repos #295

Closed
emilva opened this issue Oct 11, 2016 · 13 comments
Closed

Make it possible for travis-ci to build forked repos #295

emilva opened this issue Oct 11, 2016 · 13 comments
Labels
feat New feature or request.
Milestone

Comments

@emilva
Copy link
Contributor

emilva commented Oct 11, 2016

I am having a issue where my forked repo is not building:
go install github.com/ory-am/hydra can't load package: package github.com/ory-am/hydra: cannot find package "github.com/ory-am/hydra" in any of: /home/travis/.gimme/versions/go1.5.linux.amd64/src/github.com/ory-am/hydra (from $GOROOT) /home/travis/gopath/src/github.com/ory-am/hydra (from $GOPATH)
https://travis-ci.org/emilva/hydra/jobs/166870439#L454

The reason for this error is that any forked repo slug /github-username/hydra will never match /ory-am/hydra.

Suggested fix is to re-run line 247-250 https://travis-ci.org/emilva/hydra/jobs/166870439#L247
with ory-am/hydra instead of the forked repo slug

@aeneasr
Copy link
Member

aeneasr commented Oct 11, 2016

This can probably easily be solved by replacing go install github.com/ory-am/hydra with go install .

@emilva
Copy link
Contributor Author

emilva commented Oct 11, 2016

No, that will not work, as there are other packages inside ory-am/hydra that the install depends on. When doing that we get this warning:
`[WARN] The name listed in the config file (github.com/ory-am/hydra) does not match the current location (github.com/emilva/hydra)``

and subsequently a failure:
main.go:7:2: cannot find package "github.com/ory-am/hydra/cmd" in any of: /home/travis/gopath/src/github.com/emilva/hydra/vendor/github.com/ory-am/hydra/cmd (vendor tree) /home/travis/.gimme/versions/go1.5.linux.amd64/src/github.com/ory-am/hydra/cmd (from $GOROOT) /home/travis/gopath/src/github.com/ory-am/hydra/cmd (from $GOPATH) The command "go install ." failed and exited with 1 during .
https://travis-ci.org/emilva/hydra/jobs/166904313#L450

@aeneasr aeneasr added the feat New feature or request. label Oct 11, 2016
@aeneasr
Copy link
Member

aeneasr commented Oct 11, 2016

Ah yes, I forgot about that part. I'm not sure if this is what you suggested, but maybe there is a way to tell travis to put the source code in src/github.com/ory-am/hydra instead?

@emilva
Copy link
Contributor Author

emilva commented Oct 11, 2016

Yupp. Tried something like that in 👉 emilva@26a59b0

however, now it fails further down in some test I think https://travis-ci.org/emilva/hydra/jobs/166904073#L883

@emilva
Copy link
Contributor Author

emilva commented Oct 11, 2016

Found a related fix for it here, but have not yet made it work in this repo.

@aeneasr
Copy link
Member

aeneasr commented Oct 12, 2016

Looks like it's working almost! The culprit is now coveralls, which is trying to push the changes to coveralls.io but since the fork isn't registered there, this fails: https://travis-ci.org/emilva/hydra/jobs/166904073#L631

One idea might be to move this to after_success:

By the way, the way cfssl is doing it (https://github.com/cloudflare/cfssl/blob/master/.travis.yml#L20-L27) looks really cool, because it's just 2 lines of code without rsync dependency :)

@emilva
Copy link
Contributor Author

emilva commented Oct 13, 2016

Yupp, I will revisit it and take a look at it later!

emilva added a commit to emilva/hydra that referenced this issue Oct 15, 2016
Signed-off-by: Emil Vaagland <emilva@gmail.com>
@emilva
Copy link
Contributor Author

emilva commented Oct 15, 2016

Moved it and now the build is green! However, I still see this strange error message at the end tho:
https://travis-ci.org/emilva/hydra/jobs/167926554#L884

is it intended?

emilva added a commit to emilva/hydra that referenced this issue Oct 15, 2016
emilva added a commit to emilva/hydra that referenced this issue Oct 15, 2016
Signed-off-by: Emil Vaagland <emilva@gmail.com>
@emilva
Copy link
Contributor Author

emilva commented Oct 15, 2016

Still having some issues with just a simple create dir and move commands.
It works for go1.7 but not for the two other versions. Any idea why?

Failed build:
https://travis-ci.org/emilva/hydra/jobs/167935209#L270

Successful:
https://travis-ci.org/emilva/hydra/jobs/167935211

@aeneasr
Copy link
Member

aeneasr commented Oct 16, 2016

Yes, Hydra builds only on Go 1.7 from now on

@aeneasr
Copy link
Member

aeneasr commented Oct 16, 2016

at least in the 0.6.0 branch

@MikeRalphson
Copy link

It may be simpler to set the go_import_path explicitly in .travis.yml. See https://docs.travis-ci.com/user/languages/go#Go-Import-Path

@aeneasr
Copy link
Member

aeneasr commented Oct 17, 2016

👍

emilva added a commit to emilva/hydra that referenced this issue Oct 17, 2016
Signed-off-by: Emil Vaagland <emilva@gmail.com>
emilva added a commit to emilva/hydra that referenced this issue Oct 17, 2016
Signed-off-by: Emil Vaagland <emilva@gmail.com>
emilva added a commit to emilva/hydra that referenced this issue Oct 17, 2016
Signed-off-by: Emil Vaagland <emilva@gmail.com>
@aeneasr aeneasr added this to the milestone-omega: stable release milestone Oct 24, 2016
@aeneasr aeneasr modified the milestones: 0.6.0, milestone-omega: stable release Oct 25, 2016
@aeneasr aeneasr closed this as completed Oct 25, 2016
aeneasr pushed a commit that referenced this issue Oct 25, 2016
* oauth2: scopes should be separated by %20 and not +, to ensure javascript compatibility - closes #277
* oauth2/introspect: make endpoint rfc7662 compatible - closes #289
* warden: make it clear that ladon.Request.Subject is not required or break bc and remove it - closes #270
* travis: execute gox build only when new commit is a new tag - closes #285
* docs: improve introduction (#267)
* core: (health) monitoring endpoint - closes #216
* oauth2/introspect: make endpoint rfc7662 compatible - closes #289
* connections: remove connections API - closes #265
* oauth2: token revocation endpoint - closes #233
* vendor: update to fosite 0.5.0
* core: add sql support #292
* connections: remove connections API - closes #265
* all: coverage report is missing covered lines of nested packages - closes #296
* cmd: prettify the `hydra token user` output - closes #281
* travis: make it possible for travis-ci to build forked repos - closes #295
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

3 participants