Removed obsolete buildSrc subdir
diff --git a/build.gradle b/build.gradle
index 9fb6546..2062f85 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,24 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import org.opencord.gradle.rules.*
-import org.yaml.snakeyaml.Yaml
allprojects {
apply plugin: 'base'
- apply plugin: 'de.gesellix.docker'
-
- docker {
- // dockerHost = System.env.DOCKER_HOST ?: 'unix:///var/run/docker.sock'
- // dockerHost = System.env.DOCKER_HOST ?: 'https://192.168.99.100:2376'
- // certPath = System.getProperty('docker.cert.path') ?: "${System.getProperty('user.home')}/.docker/machine/machines/default"
- // authConfigPlain = [
- // "username" : "joe",
- // "password" : "some-pw-as-needed",
- // "email" : "joe@acme.com",
- // "serveraddress" : "https://index.docker.io/v1/"
- // ]
- }
}
ext {
@@ -51,13 +36,13 @@
// To be used to fetch upstream binaries, clone repos, etc.
task fetch(type: Exec) {
- commandLine "make", "fetch"
+ commandLine ".", "env.sh", "&&", "make", "fetch"
}
// To be used to generate all needed binaries that need to be present on the target
// as docker images in the local docker runner.
task buildImages(type: Exec) {
- commandLine "make"
+ commandLine ".", "env.sh", "&&", "make"
}
task tagImage(type: Exec) {
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
deleted file mode 100644
index cbb6652..0000000
--- a/buildSrc/build.gradle
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-apply plugin: 'groovy'
-
-repositories {
- // maven { url 'https://repo.gradle.org/gradle/libs' }
- maven { url 'https://plugins.gradle.org/m2/' }
- // mavenCentral()
-}
-
-dependencies {
- compile gradleApi()
- compile localGroovy()
- compile 'de.gesellix:gradle-docker-plugin:2016-05-05T13-15-11'
- compile 'org.yaml:snakeyaml:1.10'
- //compile 'gradle.plugin.com.tmiyamon:gradle-config:0.2.1'
-}
diff --git a/buildSrc/buildSrc.iml b/buildSrc/buildSrc.iml
deleted file mode 100644
index 2c235a5..0000000
--- a/buildSrc/buildSrc.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":buildSrc" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- </component>
-</module>
\ No newline at end of file
diff --git a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerFetchRule.groovy b/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerFetchRule.groovy
deleted file mode 100644
index a9bb91b..0000000
--- a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerFetchRule.groovy
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opencord.gradle.rules
-
-import org.gradle.api.Rule
-import de.gesellix.gradle.docker.tasks.DockerPullTask
-
-
-/**
- * Gradle Rule class to fetch a docker image
- */
-class DockerFetchRule implements Rule {
-
- def project
-
- DockerFetchRule(project) {
- this.project = project
- }
-
- String getDescription() {
- 'Rule Usage: fetch<component-name>'
- }
-
- void apply(String taskName) {
- if (taskName.startsWith('fetch')) {
- project.task(taskName, type: DockerPullTask) {
- ext.compName = taskName - 'fetch'
- def spec = project.comps[ext.compName]
- imageName = spec.name + '@' + spec.digest
- }
- }
- }
-}
diff --git a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerPublishRule.groovy b/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerPublishRule.groovy
deleted file mode 100644
index 39b6bba..0000000
--- a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerPublishRule.groovy
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opencord.gradle.rules
-
-import org.gradle.api.Rule
-import de.gesellix.gradle.docker.tasks.DockerPushTask
-
-
-/**
- * Gradle Rule class to publish (push) a docker image to a private repo
- */
-class DockerPublishRule implements Rule {
-
- def project
- def dependency
-
- DockerPublishRule(project) {
- this.project = project
- }
-
- DockerPublishRule(project, dependency) {
- this.project = project
- this.dependency = dependency
- }
-
- String getDescription() {
- 'Rule Usage: publish<component-name>'
- }
-
- void apply(String taskName) {
- if (taskName.startsWith('publish')) {
- project.task(taskName, type: DockerPushTask) {
- ext.compName = taskName - 'publish'
- println "Publish rule: $taskName + $compName"
- def tagTask = "tag$compName"
- println "Tagtask: $tagTask"
- if (dependency) {
- dependsOn dependency
- }
- dependsOn tagTask
- def spec = project.comps[ext.compName]
- repositoryName = spec.name + ':' + project.targetTag
- registry = project.targetReg
- }
- }
- }
-}
diff --git a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerTagRule.groovy b/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerTagRule.groovy
deleted file mode 100644
index 474e16d..0000000
--- a/buildSrc/src/main/groovy/org/opencord/gradle/rules/DockerTagRule.groovy
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opencord.gradle.rules
-
-import org.gradle.api.Rule
-import de.gesellix.gradle.docker.tasks.DockerTagTask
-
-
-/**
- * Gradle Rule class to tag a docker image
- */
-class DockerTagRule implements Rule {
-
- def project
-
- DockerTagRule(project) {
- this.project = project
- }
-
- String getDescription() {
- 'Rule Usage: tag<component-name>'
- }
-
- void apply(String taskName) {
- if (taskName.startsWith('tag') && !taskName.equals('tag')) {
- project.task(taskName, type: DockerTagTask) {
- ext.compName = taskName - 'tag'
- def spec = project.comps[compName]
- imageId = spec.name + '@' + spec.digest
- tag = compName + ':' + project.targetTag
- }
- }
- }
-}
diff --git a/buildSrc/src/main/groovy/org/opencord/gradle/rules/GitSubmoduleUpdateRule.groovy b/buildSrc/src/main/groovy/org/opencord/gradle/rules/GitSubmoduleUpdateRule.groovy
deleted file mode 100644
index 3b46424..0000000
--- a/buildSrc/src/main/groovy/org/opencord/gradle/rules/GitSubmoduleUpdateRule.groovy
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2012 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.opencord.gradle.rules
-
-import org.gradle.api.Rule
-import org.gradle.api.tasks.Exec
-
-
-/**
- * Gradle Rule class to fetch a docker image
- */
-class GitSubmoduleUpdateRule implements Rule {
-
- def project
-
- GitSubmoduleUpdateRule(project) {
- this.project = project
- }
-
- String getDescription() {
- 'Rule Usage: gitupdate<component-name>'
- }
-
- void apply(String taskName) {
- if (taskName.startsWith('gitupdate')) {
- project.task(taskName, type: Exec) {
- ext.compName = taskName - 'gitupdate'
- def spec = project.comps[ext.compName]
- workingDir = '.'
- commandLine '/usr/bin/git', 'submodule', 'update', '--init', '--recursive', spec.componentDir
- }
- }
- }
-}