Navigation Menu

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

scrooge: Fixing Travis CI builds #196

Closed
wants to merge 5 commits into from
Closed

Conversation

csaltos
Copy link
Contributor

@csaltos csaltos commented Jun 16, 2015

Problem

Travis CI builds are broken because they are looking for SNAPSHOT versions of their dependencies and they are not found.

Solution

Deploy the SNAPSHOT versions locally cloning the remote repos and then using sbt publishLocal

Result

Now Travis CI builds are working using the locally published SNAPSHOT versions of their dependencies

@csaltos csaltos mentioned this pull request Jun 16, 2015
@csaltos
Copy link
Contributor Author

csaltos commented Jun 16, 2015

Ready @mosesn the build is now fixed at .travis.yml for non master branches by publishing local SNAPSHOT versions accordingly.

local name=$1
local repo=$2
local branch=$3
git clone $repo || {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can simplify this by using git clone "$repo" --branch "$branch"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right ... I will go for it and change it at the script.

@mosesn
Copy link
Contributor

mosesn commented Jun 17, 2015

This is very cool, but I think if we use set -e we can avoid a lot of the manual error checking, since the tools themselves can explain what went wrong. We could potentially add -x too.

What do you think?

@csaltos
Copy link
Contributor Author

csaltos commented Jun 17, 2015

Thank you for your review !! 👍 😄 ... I'll reply on every comment of yours

@csaltos
Copy link
Contributor Author

csaltos commented Jun 17, 2015

Yes, using set -e and even with -x will be a lot better, I will do that change.

@csaltos csaltos changed the title scrooge: fixing Travis CI build scrooge: fixing Travis CI build for non master branches Jun 17, 2015
@csaltos
Copy link
Contributor Author

csaltos commented Jun 17, 2015

Ready !! 👍 😄 ... I've added the changes you proposed and the script is now cleaner and to the point.
I've just leaved a TODO for the sbt part because the internal ./sbt of the other projects are breaking the JVM when using openjdk7 with a buffer overflow error. I will try to solve it now. Any tips about it are more than welcome.

@mosesn
Copy link
Contributor

mosesn commented Jun 17, 2015

LGTM! Can you add a commit in the format described here: https://github.com/twitter/finagle/blob/master/CONTRIBUTING.md#style so it's easy to reason about when we merge it in? We should really have a CONTRIBUTING.md for scrooge too, but looks like we forgot to include one.

@nshkrob @travisbrown could you guys sign off on this too?

Problem

Travis CI builds are broken because they are looking for SNAPSHOT versions of their dependencies and they are not found.

Solution

Deploy the SNAPSHOT versions locally cloning the remote repos and then using sbt publishLocal

Result

Now Travis CI builds are working using the locally published SNAPSHOT versions of their dependencies
@csaltos
Copy link
Contributor Author

csaltos commented Jun 17, 2015

Ready Moses, now I added a commit in the format you refer me. If there is something else to complete this PR, please let me know.

@@ -14,6 +14,10 @@ object Scrooge extends Build {
val suffix = if (branch == "master") "" else "-SNAPSHOT"

val libVersion = "3.18.1" + suffix

// For develop users: if you are using new features in util and finagle dependencies
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we say "For users of the develop branch"? Seems a little clearer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it might be a good idea to recommend publishing Util and Finagle locally for anyone working on the develop branch—users may not have any idea whether Scrooge is using features that have been introduced since the last release, and if they guess wrong they may end up with weird errors (possibly at runtime).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. Here it goes !!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ostrich is also a required local dependency when working with the develop branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, I think that explanation is already included at https://github.com/twitter/scrooge/blob/master/README.md

@csaltos csaltos changed the title scrooge: fixing Travis CI build for non master branches scrooge: Fixing Travis CI builds Jun 17, 2015
@nshkrob
Copy link
Contributor

nshkrob commented Jun 17, 2015

LGTM, thanks for the patch!

@travisbrown
Copy link
Contributor

This looks great! Thanks much, @csaltos!

@csaltos
Copy link
Contributor Author

csaltos commented Jun 17, 2015

You are very welcome Moses, Nik and Travis !! 👍 😄

Problem

Travis CI builds are broken because they are looking for SNAPSHOT versions of their dependencies and they are not found.

Solution

Deploy the SNAPSHOT versions locally cloning the remote repos and then using sbt publishLocal

Result

Now Travis CI builds are working using the locally published SNAPSHOT versions of their dependencies
@csaltos
Copy link
Contributor Author

csaltos commented Jun 17, 2015

The previous build failed and it's because sometimes the builds got network errors while downloading external artifacts.

If it's OK with you, I will try to activate cache for this external artifacts to keep the builds better and also to make them faster. It's something similar to the cache configuration at Finatra here: https://github.com/twitter/finatra/blob/master/.travis.yml

Problem

Some Travis CI build failed because they got network errors while trying to download external artifacts.

Solution

Cache the external artifacts at the Travis CI configuration

Result

With the externals artifacts cached the Travis CI builds will be faster and the network errors while downloading external artifacts will be diminished
@csaltos
Copy link
Contributor Author

csaltos commented Jun 17, 2015

Ready, the cache for external artifacts is now active, so now LGTM2 !! 😉 😄

@nshkrob
Copy link
Contributor

nshkrob commented Jun 18, 2015

I've pulled this in, should show up on develop in a few days. Thanks for the patch!

@nshkrob nshkrob closed this Jun 18, 2015
@csaltos
Copy link
Contributor Author

csaltos commented Jun 19, 2015

Great, thank you Nik !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants