Skip to content

Commit 2430990

Browse files
lezzagoMikidownsrobdblockqreshi
authored
Backport main changes to 1.x (#93)
* Add themed logo to README (#41) Signed-off-by: Miki <mehranb@amazon.com> * Updates common-utils version to 1.2 (#77) * Updates common-utils version to 1.2 and Uses Maven for 1.2 dependencies Signed-off-by: Clay Downs <downsrob@amazon.com> * Publish .md5 and .sha1 signatures. (#79) (#80) * Publish .md5 and .sha1 signatures. Signed-off-by: dblock <dblock@dblock.org> * Use OpenSearch 1.1. Signed-off-by: dblock <dblock@dblock.org> * Publish source and javadoc checksums. (#81) Signed-off-by: dblock <dblock@dblock.org> * Update copyright notice (#90) Signed-off-by: Mohammad Qureshi <qreshi@amazon.com> * Update maven publication to include cksums. (#91) This change adds a local staging repo task that will include cksums. It will also update build.sh to use this new task and copy the contents of the staging repo to the output directory. The maven publish plugin will not include these cksums when publishing to maven local but will when published to a separate folder. Signed-off-by: Marc Handalian <handalm@amazon.com> * Add release notes for version 1.2.0.0 (#92) * Add release notes for version 1.2.0.0 Signed-off-by: Ashish Agrawal <ashisagr@amazon.com> Co-authored-by: Miki <mehranb@amazon.com> Co-authored-by: Clay Downs <89109232+downsrob@users.noreply.github.com> Co-authored-by: Daniel Doubrovkine (dB.) <dblock@dblock.org> Co-authored-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com> Co-authored-by: Marc Handalian <handalm@amazon.com>
1 parent 8da2031 commit 2430990

File tree

6 files changed

+89
-66
lines changed

6 files changed

+89
-66
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,14 @@ jobs:
2525
with:
2626
java-version: ${{ matrix.java }}
2727

28-
# dependencies: OpenSearch
29-
- name: Checkout OpenSearch
30-
uses: actions/checkout@v2
31-
with:
32-
repository: 'opensearch-project/OpenSearch'
33-
path: OpenSearch
34-
ref: '1.x'
35-
- name: Build OpenSearch
36-
working-directory: ./OpenSearch
37-
run: ./gradlew publishToMavenLocal
38-
3928
# common-utils
4029
- name: Build and Test
4130
run: |
42-
./gradlew build -Dopensearch.version=1.1.0-SNAPSHOT
31+
./gradlew build -Dopensearch.version=1.2.0-SNAPSHOT
4332
4433
- name: Publish to Maven Local
4534
run: |
46-
./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT
35+
./gradlew publishToMavenLocal -Dopensearch.version=1.2.0-SNAPSHOT
4736
4837
- name: Upload Coverage Report
4938
uses: codecov/codecov-action@v1

.github/workflows/push-common-utils-jar.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img src="https://opensearch.org/assets/brand/SVG/Logo/opensearch_logo_default.svg" height="64px"/>
1+
<img src="https://opensearch.org/assets/img/opensearch-logo-themed.svg" height="64px">
22

33
- [OpenSearch Common Utils](#opensearch-common-utils)
44
- [Contributing](#contributing)
@@ -44,4 +44,4 @@ This project is licensed under the [Apache v2.0 License](LICENSE.txt).
4444

4545
## Copyright
4646

47-
Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
47+
Copyright OpenSearch Contributors. See [NOTICE](NOTICE.txt) for details.

build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
buildscript {
1313
ext {
1414
opensearch_group = "org.opensearch"
15-
opensearch_version = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT")
15+
opensearch_version = System.getProperty("opensearch.version", "1.2.0-SNAPSHOT")
1616
kotlin_version = System.getProperty("kotlin.version", "1.4.32")
1717
}
1818

@@ -21,6 +21,7 @@ buildscript {
2121
mavenCentral()
2222
maven { url "https://plugins.gradle.org/m2/" }
2323
jcenter()
24+
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
2425
}
2526

2627
dependencies {
@@ -42,6 +43,7 @@ repositories {
4243
mavenCentral()
4344
maven { url "https://plugins.gradle.org/m2/" }
4445
jcenter()
46+
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
4547
}
4648

4749
ext {
@@ -155,8 +157,13 @@ task javadocJar(type: Jar) {
155157
classifier = 'javadoc'
156158
from javadoc.destinationDir
157159
}
158-
159160
publishing {
161+
repositories {
162+
maven {
163+
name = 'staging'
164+
url = "${rootProject.buildDir}/local-staging-repo"
165+
}
166+
}
160167
publications {
161168
shadow(MavenPublication) {
162169
project.shadow.component(it)
@@ -195,9 +202,4 @@ publishing {
195202

196203
gradle.startParameter.setShowStacktrace(ShowStacktrace.ALWAYS)
197204
gradle.startParameter.setLogLevel(LogLevel.DEBUG)
198-
199-
signing {
200-
required { gradle.taskGraph.hasTask("publishShadowPublicationToSonatype-stagingRepository") }
201-
sign publishing.publications.shadow
202-
}
203205
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Version 1.2.0.0 2021-11-05
2+
3+
Compatible with OpenSearch 1.2.0
4+
5+
### Infrastructure
6+
7+
* Updates common-utils version to 1.2 ([#77](https://github.com/opensearch-project/common-utils/pull/77))
8+
* Update maven publication to include cksums. ([#91](https://github.com/opensearch-project/common-utils/pull/91))
9+
10+
### Documentation
11+
12+
* Add themed logo to README ([#41](https://github.com/opensearch-project/common-utils/pull/41))
13+
* Update copyright notice ([#90](https://github.com/opensearch-project/common-utils/pull/90))
14+
* Add release notes for version 1.2.0.0 ([#92](https://github.com/opensearch-project/common-utils/pull/92))

scripts/build.sh

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash
2+
3+
# Copyright OpenSearch Contributors.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
set -ex
7+
8+
function usage() {
9+
echo "Usage: $0 [args]"
10+
echo ""
11+
echo "Arguments:"
12+
echo -e "-v VERSION\t[Required] OpenSearch version."
13+
echo -e "-s SNAPSHOT\t[Optional] Build a snapshot, default is 'false'."
14+
echo -e "-a ARCHITECTURE\t[Optional] Build architecture, ignored."
15+
echo -e "-o OUTPUT\t[Optional] Output path, default is 'artifacts'."
16+
echo -e "-h help"
17+
}
18+
19+
while getopts ":h:v:s:o:a:" arg; do
20+
case $arg in
21+
h)
22+
usage
23+
exit 1
24+
;;
25+
v)
26+
VERSION=$OPTARG
27+
;;
28+
s)
29+
SNAPSHOT=$OPTARG
30+
;;
31+
o)
32+
OUTPUT=$OPTARG
33+
;;
34+
a)
35+
ARCHITECTURE=$OPTARG
36+
;;
37+
:)
38+
echo "Error: -${OPTARG} requires an argument"
39+
usage
40+
exit 1
41+
;;
42+
?)
43+
echo "Invalid option: -${arg}"
44+
exit 1
45+
;;
46+
esac
47+
done
48+
49+
if [ -z "$VERSION" ]; then
50+
echo "Error: You must specify the OpenSearch version"
51+
usage
52+
exit 1
53+
fi
54+
55+
[[ "$SNAPSHOT" == "true" ]] && VERSION=$VERSION-SNAPSHOT
56+
[ -z "$OUTPUT" ] && OUTPUT=artifacts
57+
58+
./gradlew build -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
59+
./gradlew publishShadowPublicationToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
60+
./gradlew publishShadowPublicationToStagingRepository -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
61+
mkdir -p $OUTPUT/maven/org/opensearch
62+
cp -r ./build/local-staging-repo/org/opensearch/common-utils $OUTPUT/maven/org/opensearch/common-utils

0 commit comments

Comments
 (0)