Skip to content

Commit

Permalink
v3.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Stu Arnett committed Aug 2, 2022
1 parent ddf4555 commit 8e8b254
Show file tree
Hide file tree
Showing 433 changed files with 9,480 additions and 7,287 deletions.
4 changes: 2 additions & 2 deletions .ci/build.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void build() {

stage('Publish Client') {
if (args.pushToArtifactory == true) {
String publishUrl = common.ARTIFACTORY.getUrlForRepo(args.publishRepoName)
String publishUrl = common.ARTIFACTORY.getUrlForRepo(args.publishRepoName, true)
String publishCred = common.ARTIFACTORY.getCredentialsIdForPublish(args.publishRepoName)
timeout(60) {
withCredentials([[$class : 'UsernamePasswordMultiBinding',
Expand All @@ -68,7 +68,7 @@ void build() {
// TODO: define CI test job
if (env.JOB_NAME.contains("ecs-sync-master-build")) {
stage('Run CI Job') {
// start ci job: https://asd-ecs-jenkins.isus.emc.com/jenkins/job/ecs-sync-master-ci/
// start ci job: ecs-sync-master-ci
build([job : 'ecs-sync-master-ci'.toString(),
parameters: [
string(name: 'ECS_SYNC_VERSION', value: args.version),
Expand Down
8 changes: 8 additions & 0 deletions .drp/copyright_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
project_exclusion_list:
exclusion_file_paths:
- 'license.ij.vm'
- 'gradlew'
- 'gradlew.bat'
exclusion_files_pattern:
- '*.gradle'
exclusion_folders:
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2013-2018 EMC Corporation. All Rights Reserved.
Copyright (c) 2013-2022 Dell Inc. or its subsidiaries. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ ecs-sync is a bulk copy utility that can move data between various systems in pa

For more information, please see the [wiki](https://github.com/EMCECS/ecs-sync/wiki)

Dependency Updates
=========

To check for updated dependency versions across all modules, use the [gradle-versions-plugin](https://github.com/ben-manes/gradle-versions-plugin):
```shell
./gradlew dependencyUpdates
```
75 changes: 72 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
plugins {
id 'idea'
id 'eclipse'
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'com.github.jk1.dependency-license-report' version '1.16'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.jk1.dependency-license-report' version '2.0' // 2.x requires Gradle 7
id "com.github.ben-manes.versions" version "0.42.0"
id 'distribution'
}

// NOTE: version is specified in gradle.properties
// NOTE: All dependencies should be specified in dependencies.toml
// NOTE: All dependencies should be specified in platform/build.gradle

defaultTasks ':distZip'

Expand All @@ -23,6 +24,43 @@ configurations {
}
}

project.ext {
// to exclude storage plugins, set project property storage.excludes with a list of storage plugin short-names separated by comma
// e.g. -Pstorage.excludes="nfs,azure"
storageIncludes = []
storageExcludes = []

if (project.hasProperty('storage.excludes')) {
storageExcludes.addAll(project.property('storage.excludes').split(','))
}
file("${rootProject.projectDir}/storage-plugins").eachDir {
if (storageExcludes.contains(it.name.split('-storage')[0])) {
logger.warn("storage-plugin project ${it.name} is excluded.")
} else {
storageIncludes.add(it.name.split('-model')[0])
logger.info("Added storage-plugin project ${it.name}.")
}
}
storageIncludes.unique()

// to exclude filter plugins, set project property filter.excludes with a list of plugin names separated by comma
// e.g. -Pfilter.excludes="cas-extractors,fs-filters"
filterIncludes = []
filterExcludes = []
if (project.hasProperty('filter.excludes')) {
filterExcludes.addAll(project.property('filter.excludes').split(','))
}
file("${rootProject.projectDir}/filter-plugins").eachDir {
if (filterExcludes.contains(it.name.split('-model')[0])) {
logger.warn("filter-plugin project ${it.name} is excluded.")
} else {
filterIncludes.add(it.name.split('-model')[0])
logger.info("Added filter-plugin project ${it.name}.")
}
}
filterIncludes.unique()
}

// depend on testReportData from all subprojects
dependencies {
testReportData project(':ecs-sync-cli')
Expand Down Expand Up @@ -61,6 +99,7 @@ distributions {
from generateLicenseReport
}
from { project(':ecs-sync-cli').shadowJar }
from { customPluginListFile }
from { project(':ecs-sync-ctl').shadowJar }
from 'script'
into('samples') {
Expand All @@ -74,3 +113,33 @@ distributions {
}
}
}

def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}

dependencyUpdates {
revision = 'release'
checkForGradleUpdate = true
gradleReleaseChannel = 'current'
rejectVersionIf {
isNonStable(it.candidate.version) || it.candidate.version == '20040117.000000' // bogus commons-cli version
}
}

task customPluginListFile {
def outputFile = new File(buildDir, "custom-plugin-package.txt")
if (outputFile.exists()) outputFile.delete()
outputs.file(outputFile)

doLast {
if (!project.ext.storageExcludes.isEmpty() || !project.ext.filterExcludes.isEmpty()) {
outputFile.write("Storage-Plugin-Includes: " + project.ext.storageIncludes.toString().replace("[", "").replace("]", "").replace("-storage", "") + "\n")
outputFile.append("Storage-Plugin-Excludes: " + project.ext.storageExcludes.toString().replace("[", "").replace("]", "") + "\n")
outputFile.append("Filter-Plugin-Includes: " + project.ext.filterIncludes.toString().replace("[", "").replace("]", "") + "\n")
outputFile.append("Filter-Plugin-Excludes: " + project.ext.filterExcludes.toString().replace("[", "").replace("]", "") + "\n")
}
}
}
28 changes: 24 additions & 4 deletions buildSrc/src/main/groovy/java-module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ group = 'com.emc.ecs.sync'
repositories {
mavenLocal()
mavenCentral()
jcenter()
}

java {
Expand Down Expand Up @@ -34,6 +35,18 @@ test {
}

configurations {
// required to support the "internal" platform module, which is not intended to be published, but only serves as
// dependency version management
internal {
canBeResolved = false
canBeConsumed = false
}
compileClasspath.extendsFrom(internal)
runtimeClasspath.extendsFrom(internal)
testCompileClasspath.extendsFrom(internal)
testRuntimeClasspath.extendsFrom(internal)
testFixturesCompileClasspath.extendsFrom(internal)
testFixturesRuntimeClasspath.extendsFrom(internal)
// Share the test report data to be aggregated for the whole project
binaryTestResultsElements {
canBeResolved = false
Expand All @@ -44,9 +57,16 @@ configurations {
}
outgoing.artifact(test.binaryResultsDirectory)
}
// make sure we don't pull in log4j 1.x from transitives
all.collect { configuration ->
configuration.exclude group: 'log4j', module: 'log4j'
configuration.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
all {
// make sure we don't pull in log4j 1.x or commons-logging from transitives
exclude group: 'log4j', module: 'log4j'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'commons-logging', module: 'commons-logging'
// update netty to latest
resolutionStrategy.dependencySubstitution {
// this is a special case, because Netty changed its group coordinate
substitute module("org.jboss.netty:netty") using module("io.netty:netty:3.10.6.Final") because "Netty relocated to a different group after 3.2.9"
}
// resolutionStrategy.force 'io.netty:netty:3.10.6.Final'
}
}
21 changes: 11 additions & 10 deletions buildSrc/src/main/groovy/library-publication.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@ plugins {
id 'maven-publish'
}

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier.set('sources')
java {
withJavadocJar()
withSourcesJar()
}

javadoc {
options.encoding = 'UTF-8'
options.addStringOption('Xdoclint:none', '-quiet')
}

task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc
archiveClassifier.set('javadoc')
}

publishing {
publications {
library(MavenPublication) {
from components.java
artifact tasks.sourcesJar
artifact tasks.javadocJar
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}

Expand Down
16 changes: 15 additions & 1 deletion check-repo-for-deps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/usr/bin/env bash

#
# Copyright (c) 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# 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.
#
########
# Script to check a given maven repository for all runtime dependencies required by modules in this project
########
Expand Down
48 changes: 0 additions & 48 deletions dependencies.gradle

This file was deleted.

15 changes: 15 additions & 0 deletions docker/start-haproxy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
#!/bin/sh
#
# Copyright (c) 2015 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# 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.
#
docker ps -a | grep running-haproxy 2> /dev/null
if [ $? -ne 0 ]; then
cp haproxy/haproxy.cfg haproxy/haproxy.cfg.inst
Expand Down
15 changes: 15 additions & 0 deletions docker/start-mariadb.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
#!/bin/sh
#
# Copyright (c) 2015 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# 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.
#
docker ps -a | grep running-mariadb 2> /dev/null
if [ $? -ne 0 ]; then
. $(dirname $0)/mysql.env
Expand Down
15 changes: 15 additions & 0 deletions docker/stop-haproxy.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
#!/bin/sh
#
# Copyright (c) 2015 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# 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.
#
docker stop running-haproxy
15 changes: 15 additions & 0 deletions docker/stop-mariadb.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
#!/bin/sh
#
# Copyright (c) 2015 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# 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.
#
docker stop running-mariadb
Loading

0 comments on commit 8e8b254

Please sign in to comment.