Skip to content

Instantly share code, notes, and snippets.

@musketyr
Created August 17, 2011 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save musketyr/1151585 to your computer and use it in GitHub Desktop.
Save musketyr/1151585 to your computer and use it in GitHub Desktop.
Using CloudBees repository in Gradle script
// some configurations
// this is your username, not an email! you can find it
// at https://grandcentral.cloudbees.com/account/settings
def cloudbeesUsername = 'vlada.appsatori'
def cloudbeesPassword = '#!@$***'
// this is your account name which could be found
// right bellow your username at the same page
def cloudbeesAccountName = 'appsatori'
repositories {
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials(
// this is the trickiest part. the realm must be account name plus ' repository'
"$cloudbeesAccountName repository",
"repository-${cloudbeesAccountName}.forge.cloudbees.com",
cloudbeesUsername,
cloudbeesPassword
)
// you can also use release or private one
mavenRepo(
name: 'cloudbees',
urls: ["https://repository-${cloudbeesAccountName}.forge.cloudbees.com/snapshot/"]
)
// your other repositories
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment