Skip to content

Commit b634567

Browse files
committed
Publish to Maven
1 parent d8be4b1 commit b634567

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

azure-pipelines.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ stages:
6969
vmImage: $(imageName)
7070
steps:
7171
- template: ci/tiledb-java-windows-release.yml
72-
7372
- stage: Release
7473
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
7574
jobs:

build.gradle

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
}
1111

1212
group 'io.tiledb'
13-
version '0.2.8-SNAPSHOT'
13+
version '0.2.8-test4-SNAPSHOT'
1414

1515
repositories {
1616
jcenter()
@@ -20,11 +20,6 @@ repositories {
2020
}
2121
}
2222

23-
nexusStaging {
24-
username = System.getenv('SONATYPE_USERNAME')
25-
password = System.getenv('SONATYPE_PASSWORD')
26-
}
27-
2823
sourceCompatibility = 1.8
2924
targetCompatibility = 1.8
3025

@@ -158,6 +153,7 @@ artifacts {
158153
import org.gradle.plugins.signing.Sign
159154
gradle.taskGraph.whenReady { taskGraph ->
160155
if (taskGraph.allTasks.any { it instanceof Sign }) {
156+
println System.getenv('GPG_KEY_ID')
161157
allprojects { ext."signing.keyId" = System.getenv('GPG_KEY_ID') }
162158
allprojects { ext."signing.secretKeyRingFile" = System.getenv('GPG_KEY_LOCATION') }
163159
allprojects { ext."signing.password" = System.getenv('GPG_PASSPHRASE') }

ci/tiledb-java-final-jar.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ steps:
55
- bash: |
66
unset SYSTEM
77
set +e
8+
89
mv ../libraries/* .
910
1011
mkdir -p ./build/install/lib
@@ -58,4 +59,16 @@ steps:
5859
inputs:
5960
pathtoPublish: $(Build.BinariesDirectory)
6061
artifactName: final-jar
61-
condition: succeeded()
62+
condition: succeeded()
63+
64+
- bash: |
65+
echo "USERNAME"
66+
echo $SONATYPE_USERNAME
67+
./ci/upload_to_maven.sh
68+
env:
69+
GPG_KEY_ID: $(GPG_KEY_ID)
70+
GPG_PASSPHRASE: $(GPG_PASSPHRASE)
71+
GPG_SECRET_KEYS_ENC: $(GPG_SECRET_KEYS_ENC)
72+
SONATYPE_USERNAME: $(SONATYPE_USERNAME)
73+
SONATYPE_PASSWORD: $(SONATYPE_PASSWORD)
74+
displayName: "Publish"

ci/upload_to_maven.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/usr/bin/env bash
22

3+
export GPG_KEY_LOCATION=$(pwd)/encrypted.key
34
echo "Starting upload to maven"
4-
mkdir .travis
5-
echo "${GPG_SECRET_KEYS_ENC}" | base64 --decode > ${ENCRYPTED_GPG_KEY_LOCATION}
6-
openssl aes-256-cbc -K $encrypted_a2869fb015d7_key -iv $encrypted_a2869fb015d7_iv -in $ENCRYPTED_GPG_KEY_LOCATION -out $GPG_KEY_LOCATION -d
5+
echo "${GPG_SECRET_KEYS_ENC}" | base64 --decode > $GPG_KEY_LOCATION
76
./gradlew properties -q | grep "version:" | awk '{print $2}'
87
export PROJECT_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}')
98
# Upload only snapshots to sonatype oss so it can make its way to maven central

0 commit comments

Comments
 (0)