Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Support for bintray organizations #37

Merged
merged 1 commit into from
Mar 16, 2014

Conversation

0x6e6562
Copy link
Collaborator

Right now the bintray task assumes that the bintray subject and user are the same entity. This is not the case with organizations. So this patch introduces an an explicitly delineated user parameter for the BASIC_AUTH settings. This allows a user to specify an organization as a subject, which will be different to the user. To maintain compatibility with the existing behavior, what I have I done is to make the user parameter optional. When it is set explicitly in the task config, it will be used. If it is not set, then the subject parameter will be used. So by default, the existing behavior is preserved. But if you need to specify an organization, you can.

laher added a commit that referenced this pull request Mar 16, 2014
@laher laher merged commit 6766840 into laher:master Mar 16, 2014
@laher
Copy link
Owner

laher commented Mar 16, 2014

thanks Ben, great stuff. That task could do with some love, thanks for helping

@laher
Copy link
Owner

laher commented Mar 16, 2014

By the way I added you to the project - although I meant to add you & then subsequently invite you to merge the pull request yourself, as described by 'felixge'. http://felixge.de/2013/03/11/the-pull-request-hack.html
i.e. thanks & keep going if you like.
Cheers

@0x6e6562
Copy link
Collaborator Author

Thanks very much for merging this, but even more so for joining me up to the project. I'm a maintainer of a few group projects on Github and hence know what this means to be included in this group.

BTW, I'm looking at do the bintray deployment from Travis, so I was wondering how deal with the API key in the .goxc.local.json file. Is there a way to source a parameter from an environment variable? For example, I could use Travis encryption to set the API key into an environment variable. But goxc would need to read this.

@0x6e6562
Copy link
Collaborator Author

For now I've solved this issue by encrypting the .goxc.local.json with openssl, encrypting the key with travis and then decrypting the .goxc.local.json file in the before_script callback. See here for details.

@laher
Copy link
Owner

laher commented Mar 16, 2014

Your solution is great, and potentially goxc should support encrypted
config items (key management might make it complicated though)

But, if you like you can already do it with env variables as follows:

goxc xc package bintray -apikey=$BINTRAY_APIKEY

(Any flags specified after a task name are interpreted as task parameters
for that task)

On Mon, Mar 17, 2014 at 4:16 AM, Ben Hood notifications@github.com wrote:

For now I've solved this issue by encrypting the .goxc.local.json with
openssl, encrypting the key with travis and then decrypting the
.goxc.local.json file in the before_script callback. See herehttps://github.com/relops/rmq/blob/master/.travis.ymlfor details.

Reply to this email directly or view it on GitHubhttps://github.com//pull/37#issuecomment-37759630
.

@0x6e6562
Copy link
Collaborator Author

Ah, I didn't know you could specify task variables in that way - had I known that, I would have just got Travis to encrypt the environment variable. Anyway, it's good to know that this option exists.

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

Successfully merging this pull request may close these issues.

None yet

2 participants