Skip to content

Conversation

@soltysh
Copy link
Contributor

@soltysh soltysh commented Apr 27, 2015

@mfojtik @bparees this is the initial and main part of my git card PTAL

Copy link
Contributor

Choose a reason for hiding this comment

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

more doc about what constitutes a valid secret today?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think I should explain how to setup a secret over here, it'll only pollute build docs with unnecessary details, which should be covered in secrets. Of course there will be some more information around that topic in our docs, but I don't think it's necessary here.

Copy link
Contributor

Choose a reason for hiding this comment

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

i'm not looking for major detail, but "secret must be an SSH key for git auth" or something... our API turns out to be our docs frequently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@bparees
Copy link
Contributor

bparees commented Apr 28, 2015

@soltysh is the assumption that they'll use a git url that includes the username for source cloning (ie an ssh url)? you might double check that the web console "create from source" tolerates that format for a source uri.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bparees @smarterclayton one question that pop-ed up in my head today, why not using ObjectReference for that? I've taken here the approach @mfojtik did when doing secrets for docker push, but wouldn't it be desirable to use ObjectReference to mark this field as using external object?

Copy link
Contributor

Choose a reason for hiding this comment

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

ObjectRef would make sense to me..that would enable you to use a secret from a different namespace also.

Copy link
Contributor

Choose a reason for hiding this comment

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

You're not allowed to reference secrets from other namespaces by design today.

On Apr 28, 2015, at 11:31 AM, Ben Parees [email protected] wrote:

In pkg/build/api/types.go:

@@ -111,6 +111,10 @@ type BuildSource struct {
// This allows to have buildable sources in directory other than root of
// repository.
ContextDir string json:"contextDir,omitempty"
+

  • // SourceSecretName is the name of a Secret that would be used for setting
  • // up the authentication for cloning private repository.
  • SourceSecretName string json:"sourceSecretName,omitempty"
    ObjectRef would make sense to me..that would enable you to use a secret from a different namespace also.


Reply to this email directly or view it on GitHub.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's what I was told, and I kinda agree with that argument. Still using an ObjectReference is a good practice IMHO, to notify readers of the API we are reaching somewhere else to get that object, even though withing the scope of your namespace.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, secrets are excluded from that argument for the time being.

On Apr 28, 2015, at 3:43 PM, Maciej Szulik [email protected] wrote:

In pkg/build/api/types.go:

@@ -111,6 +111,10 @@ type BuildSource struct {
// This allows to have buildable sources in directory other than root of
// repository.
ContextDir string json:"contextDir,omitempty"
+

  • // SourceSecretName is the name of a Secret that would be used for setting
  • // up the authentication for cloning private repository.
  • SourceSecretName string json:"sourceSecretName,omitempty"
    Yeah, that's what I was told, and I kinda agree with that argument. Still using an ObjectReference is a good practice IMHO, to notify readers of the API we are reaching somewhere else to get that object, even though withing the scope of your namespace.


Reply to this email directly or view it on GitHub.

@mfojtik
Copy link
Contributor

mfojtik commented Apr 29, 2015

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: you can just return script.Close() here.

@smarterclayton
Copy link
Contributor

Hold for review - want to look through this.

@soltysh
Copy link
Contributor Author

soltysh commented Apr 29, 2015

@smarterclayton sure, I'm updating the UI part, as it doesn't allow you to pass git url such as [email protected]:openshift/ruby-hello-world.git yet (thx to @bparees vigilance) and we totally lack tests there, so trying to add those as well.

@soltysh
Copy link
Contributor Author

soltysh commented Apr 29, 2015

@bparees @Kargakis addressed your comments. @smarterclayton ready for final review.
[test] in the mean time.

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/2063/)

@soltysh
Copy link
Contributor Author

soltysh commented Apr 30, 2015

Rebased and fixed new-app CLI, which wasn't properly treating git+ssh URLs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why does it have to be an SSH key? It could just as easy be basic auth (probably more common) or a client cert.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll just then remove the 2nd sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since @bparees insistent on having some description of the contents of the secret, I've reworked that sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I take that back, per my card we're adding just the SSH key auth method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But I'll prepare the mechanism for easily adding the rest of the methods, so in the end that description will be generally for all of the methods.

@soltysh
Copy link
Contributor Author

soltysh commented May 4, 2015

@smarterclayton addressed most of your comments, others replied. PTAL.

@soltysh soltysh force-pushed the card286 branch 2 times, most recently from 9c913c5 to ffe40a5 Compare May 7, 2015 09:16
Copy link
Contributor

Choose a reason for hiding this comment

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

why not use exec.Command here as well? You can then avoid listing files using Go and just "chmod -R 0600 dir"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was faster than chmod magic, just to change contents permissions. And passing * is a pain to exec.

@soltysh
Copy link
Contributor Author

soltysh commented May 7, 2015

@mfojtik addressed your comments, especially about moving the fixing permissions part to separate method. @smarterclayton PTAL.

@soltysh
Copy link
Contributor Author

soltysh commented May 8, 2015

@smarterclayton addressed your comments, except for the two explained inline.

@smarterclayton
Copy link
Contributor

LGTM, [merge]

On May 8, 2015, at 5:38 AM, Maciej Szulik [email protected] wrote:

@smarterclayton addressed your comments, except for the two explained inline.


Reply to this email directly or view it on GitHub.

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/1858/) (Image: devenv-fedora_1474)

@soltysh
Copy link
Contributor Author

soltysh commented May 9, 2015

Rebased.

@openshift-bot
Copy link
Contributor

Evaluated for origin up to a208f1c

openshift-bot pushed a commit that referenced this pull request May 9, 2015
@openshift-bot openshift-bot merged commit a6f5f58 into openshift:master May 9, 2015
@soltysh soltysh deleted the card286 branch July 7, 2015 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants