Skip to content

Commit c135121

Browse files
committed
JCBC-2200 GHA: Automate publishing Java client release archive
Motivation ---------- Some developers still use the release archive. Modifications ------------- Change the [previously unused] "release-archive" assembly: - Now it creates a directory instead of a ZIP archive, for transparency when files are added later. - Now it includes only external dependencies. Couchbase modules are added later by the deploy-release workflow. Add an "Upload Java SDK archive" step to the deploy-release workflow. This step augments the release archive directory with artifacts from the core-io, java-client, metrics-opentelemetry, and metrics-micrometer modules. Then it ZIPs the directory and publishes it to S3. Change-Id: I831e04083ebcc2e135afb16352e91c33df322094 Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/229709 Reviewed-by: Michael Reiche <[email protected]> Tested-by: Build Bot <[email protected]>
1 parent c26d14c commit c135121

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

.github/workflows/deploy-release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,14 @@ jobs:
5555
upload "scala-client" "target/site/scaladocs"
5656
upload "kotlin-client" "target/dokka"
5757
upload "columnar-java-client" "target/reports/apidocs"
58+
59+
- name: Upload Java SDK archive
60+
run: |
61+
VERS=${{ inputs.tag }}
62+
ARCHIVE_DIR=java-client/target/Couchbase-Java-Client-${VERS}
63+
for module in core-io java-client metrics-opentelemetry metrics-micrometer; do
64+
cp -v ${module}/target/${module}*.jar ${ARCHIVE_DIR}
65+
cp -v ${module}/.flattened-pom.xml ${ARCHIVE_DIR}/${module}-${VERS}.pom
66+
done
67+
zip --junk-paths ${ARCHIVE_DIR}.zip ${ARCHIVE_DIR}/*
68+
aws s3 cp --acl public-read ${ARCHIVE_DIR}.zip s3://packages.couchbase.com/clients/java/${VERS}/

java-client/src/assembly/release-archive.xml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
<assembly
22
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
4+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 https://maven.apache.org/xsd/assembly-1.1.2.xsd">
55

66
<id>release-archive</id>
77

88
<formats>
9-
<format>zip</format>
9+
<format>dir</format>
1010
</formats>
1111

12-
<includeBaseDirectory>true</includeBaseDirectory>
13-
14-
<fileSets>
15-
<fileSet>
16-
<outputDirectory/>
17-
<!-- sources and javadoc for core-io -->
18-
<directory>${project.build.directory}/dependency-attachments</directory>
19-
</fileSet>
20-
</fileSets>
12+
<includeBaseDirectory>false</includeBaseDirectory>
2113

2214
<dependencySets>
2315
<dependencySet>
2416
<outputDirectory/>
25-
<useProjectArtifact>true</useProjectArtifact>
26-
<useProjectAttachments>true</useProjectAttachments>
17+
<useProjectArtifact>false</useProjectArtifact>
2718
<excludes>
2819
<!-- don't want optional dependencies -->
2920
<exclude>com.fasterxml.jackson.core:*</exclude>
21+
22+
<!-- Couchbase artifacts are added later by release workflow script -->
23+
<exclude>com.couchbase.client:*</exclude>
24+
25+
<!-- Exclude these for parity with 3.8.x archive -->
26+
<exclude>org.slf4j:*</exclude>
27+
<exclude>org.jspecify:*</exclude>
3028
</excludes>
3129
</dependencySet>
3230
</dependencySets>

0 commit comments

Comments
 (0)