openshift / openshift-java-client

Java Client for the OpenShift REST API
Other
64 stars 66 forks source link

Specifying the target branch of a git repository #223

Closed kiuby88 closed 3 years ago

kiuby88 commented 9 years ago

Web console allows to select a target branch for cloning a repository. I think it could be interesting to add this feature to the java client. WDYT?

adietish commented 9 years ago

I'm not sure that I get you right: you're talking of the url for downloadable cartridges, right? So you'd like to be able to provide the library with the git url and branch for downloadable cartridges?

kiuby88 commented 9 years ago

Hi @adietish, thanks for your reply

I am talking about the git repositories of the applications which will be deployed. Using the web console, you can specify the git url where the application's source code is stored and the branch which will be cloned, for example origin/any-feature-wip.

adietish commented 9 years ago

Hi @kiuby88

so you're talking of OpenShift v3, not v2, right?

kiuby88 commented 9 years ago

Hi,

I am talking of v2, but I think it ma be useful for any version. In any case, I think I should migrate to OpenShift v3, right?

adietish commented 9 years ago

@kiuby88 hmm, so I unfortunately still dont fully follow. can you please point me to the (screenshot maybe) where you can provide this? Is this the application code (application template code) that you get when creating your openshift application? application-source

Yes at some point migrating to v3 will be the way to go since it'll replace v2 at some point in mid-term future. On the other hand v3 is a complete rewrite, a completely different beast and we're early with it. It's more powerful but not as comfortable/cozy as v2 yet.

kiuby88 commented 9 years ago

It is a snapshot of the OpenShift web console. You can specify the git repository where the application is stored and the branch that will be used, instead of use the master (HEAD) branch.

captura de pantalla 2015-07-04 a la s 11 52 14

Using the client lib, you can just specify the git repository, and I think that it could be interesting to specify the branch for the java-client-lib too.

new ApplicationBuilder(domain)
                .setName(applicationName)
                .setStandaloneCartridge(cartridge)
                .setApplicationScale(scale1)
                .setInitialGitUrl(gitRepositoryUrl)
                .build();

For example adding something as .setGitBranch(branch).

Once, thanks a lot for your reply.

adietish commented 9 years ago

in the above screenshot from web-ui "custom-env" is the branch that you get your application source from, right? Sounds like a small but very useful enhancement. And yes, your suggestion for the API sounds good. The last impediment we have is the very little time that's left for maintenance in OpenShift v2. If we'd assist you, is this something you'd like to contribtute? That would be awesome if possible.

kiuby88 commented 9 years ago

Of course @adietish. I'd love developing this feature, I will take a look and write you.

adietish commented 9 years ago

awesome! looking forward to it. Whenever needed feel free to ping me :) (I'm always on irc on #jbosstools)

openshift-bot commented 4 years ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot commented 4 years ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot commented 3 years ago

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-ci-robot commented 3 years ago

@openshift-bot: Closing this issue.

In response to [this](https://github.com/openshift/openshift-java-client/issues/223#issuecomment-703291630): >Rotten issues close after 30d of inactivity. > >Reopen the issue by commenting `/reopen`. >Mark the issue as fresh by commenting `/remove-lifecycle rotten`. >Exclude this issue from closing again by commenting `/lifecycle frozen`. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.