Repository: bigtop Updated Branches: refs/heads/master a03c59907 -> 152bebe1d
Revert "BIGTOP-2081: Implement a nexus docker container for CI" This reverts commit 775ab7f544ae17ac97b45e6a96937494b5ea8a43. Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/152bebe1 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/152bebe1 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/152bebe1 Branch: refs/heads/master Commit: 152bebe1d8b9a5f97010defe2a669290d4621508 Parents: a03c599 Author: Olaf Flebbe <o...@ofleb.be> Authored: Sat Dec 5 18:54:29 2015 +0100 Committer: Olaf Flebbe <o...@ofleb.be> Committed: Sat Dec 5 18:54:29 2015 +0100 ---------------------------------------------------------------------- build.gradle | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/152bebe1/build.gradle ---------------------------------------------------------------------- diff --git a/build.gradle b/build.gradle index 047abc3..2a48056 100644 --- a/build.gradle +++ b/build.gradle @@ -310,52 +310,6 @@ def artifactToInstall = { } } -def generate_nexus_tasks = { name, url, snapshot -> - task "configure-nexus-${name}"(type: Exec) { - def req = [ data : [ id: name, name: name, repoType: "proxy", repoPolicy : snapshot, browseable: true, "indexable": true, "notFoundCacheTTL": 1440, - "artifactMaxAge": 1440, "metadataMaxAge": 1440, "itemMaxAge": 1440, "provider": "maven2", - "providerRole": "org.sonatype.nexus.proxy.repository.Repository", "downloadRemoteIndexes": true, - "autoBlockActive": true, "fileTypeValidation": true, "exposed": true, "checksumPolicy": "WARN", - "remoteStorage": ["remoteStorageUrl": url, "authentication": null, - "connectionSettings": null]]] - def root = new groovy.json.JsonBuilder(req) - def p = root.toString() - File.createTempFile("temp",".tmp").with { - deleteOnExit() - - write root.toString() - - workingDir '.' - commandLine "curl", "-o", "/dev/null", "-X", "POST", "-d", "@$absolutePath", "--header", "Content-Type: application/json", "-u", "admin:admin123", "http://localhost:8081/service/local/repositories" - } - } -} - -def repos = [ [ "name": "conjars", "url" : "http://conjars.org", 'snapshot':'RELEASE'], - [ "name": "repository.jboss.org", "url": "http://repository.jboss.org/nexus/content/groups/public/", 'snapshot': 'RELEASE'], - [ "name": "apache.snapshots.https", "url": "https://repository.apache.org/content/repositories/snapshots", "snapshot": "SNAPSHOT"], - [ "name": "apache.snapshots", "url": "https://repository.apache.org/content/repositories/snapshots", "snapshot": "SNAPSHOT"]] - -repos.each { r-> - generate_nexus_tasks( r.name, r.url, r.snapshot) -} - -task "configure-nexus"(dependsOn: tasks.findAll { alltask -> alltask.name.startsWith("configure-nexus-")}*.name, - description: "configure all repos") { - def m2Dir = System.getProperty("user.home") + "/.m2" - mkdir(m2Dir) - def writer = new File(m2Dir + "/settings.xml") - def writeMirrorLine = { name -> - writer.append("<mirror><name>$name</name><url>http://localhost:8081/content/repositories/$name/</url><mirrorOf>$name</mirrorOf></mirror>") - } - writer.text = "<settings><mirrors>" - writeMirrorLine( "central") - repos.each{ r-> - writeMirrorLine( r.name) - } - writer.append("</mirrors></settings>") -} - task "gen-gradle-home"(type:Exec, description: 'Pre-load gradle home as cache for bigtop/slaves images', group: DOCKERBUILD_GROUP) {