Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add ProwJob publish-java-sdk
  • Loading branch information
davidheryanto committed Jan 4, 2020
commit 6240ce353b30f6e0a5cb1abd4bfbd5ca2c2fc4e3
29 changes: 29 additions & 0 deletions .prow/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,34 @@ postsubmits:
# https://github.com/semver/semver/issues/232
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$

- name: publish-java-sdk
decorate: true
spec:
containers:
- image: maven:3.6-jdk-8
command:
- bash
- -c
- .prow/scripts/publish-java-sdk.sh --revision ${PULL_BASE_REF:1}
volumeMounts:
- name: gpg-keys
mountPath: /etc/gpg
readOnly: true
- name: maven-settings
mountPath: /root/.m2/settings.xml
subPath: settings.xml
readOnly: true
volumes:
- name: gpg-keys
secret:
secretName: gpg-keys
- name: maven-settings
secret:
secretName: maven-settings
branches:
# Filter on tags with semantic versioning, prefixed with "v"
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$

- name: publish-docker-images
decorate: true
spec:
Expand Down Expand Up @@ -278,4 +306,5 @@ postsubmits:
secret:
secretName: feast-service-account
branches:
# Filter on tags with semantic versioning, prefixed with "v"
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$
8 changes: 5 additions & 3 deletions .prow/scripts/publish-java-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ usage()
The default value is '/etc/gpg'

This script assumes the GPG private key is protected by a passphrase.
The passphrase can be specified in \$HOME/.m2/settings.xml:
The passphrase can be specified in \$HOME/.m2/settings.xml. In the same xml
file, credentials to upload releases to Sonatype must also be provided.

# ~/.m2/settings.xml
# Example settings: ~/.m2/settings.xml
<settings>
<servers>
<server>
Expand Down Expand Up @@ -56,6 +57,7 @@ echo "============================================================"
echo "Checking Maven and GPG versions"
echo "============================================================"
mvn --version
echo ""
gpg --version

echo "============================================================"
Expand All @@ -67,4 +69,4 @@ gpg --import --batch --yes /etc/gpg/private-key
echo "============================================================"
echo "Deploying Java SDK with revision: $REVISION"
echo "============================================================"
mvn --projects sdk/java -Drevision=$REVISION clean deploy
mvn --projects sdk/java -Drevision=$REVISION --batch-mode clean deploy
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down