-
Notifications
You must be signed in to change notification settings - Fork 441
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
Use spotify docker-client for docker:publishLocal goal #658
Conversation
Sweet. Looks pretty simple to me. One big thing. We shouldn't replace the native implementation, but instead provide a plugin overriding the native task. See the JDebPackaging as an example |
You mean not just a |
I had to do this for the Debian stuff as it's a lot more messy and it was written before autoplugins were introduced. So for docker you would put exactly your code in a By this we keep the Spotify part to a minimum and makes use of improvements in the core plugin. |
Adding conversation from gitter (@jsuereth , @fiadliel )
|
@muuki88 I think I coded it but I'm getting trouble on how to activate |
Can you push your code here? otherwise it's hard to say what went wrong ;) |
I finally did it. |
That looks pretty smooth. The only thing I'm still struggling is, if we should put this in sbt-native-packager itself or in a new project and feature it here. @fiadliel has a point. We don't know on what libraries clients depend and what conflicts can occur. The spotify client depends on a few stuff that can really be critical (even for this lib alone)
On the other hand, keeping it here in the code base it's a lot easier for users and for developers to use (in case of no conflicts) |
@gbougeard can you squash the commits into one? Actually I want to merge this and release an milestone release, hoping to gather some feedback. |
d19b5ae
to
52074a0
Compare
val id = docker.build(Paths.get(dockerDirectory), tag, new ProgressHandler() { | ||
def progress(message: ProgressMessage) = { | ||
val error: String = message.error() | ||
if (error != null && !error.isEmpty) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree but spotify docker-client is a java lib, how could it be done another way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example
Option(message.error()) match {
case Some(error) if error.nonEmpty => log.error(message.error())
case _ => log.info(message.stream())
}
Use spotify docker-client for docker:publishLocal goal
52074a0
to
6dd1f3c
Compare
Is it ok for you now? |
* | ||
* == Requirements == | ||
* | ||
* You need docker to have docker installed on your system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is actually not a requirement, via an env var you can just point at a remote endpoint
Use spotify docker-client for docker:publishLocal goal
Awesome. I release a soon I have time |
Great we need that milestone release :) |
@gbougeard |
Handle #558 only for
publishLocal
.publish
is a little bit complex as it requires to handle push to private repositories and credentials.