Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Nexus staging plugin for deployment #394

Merged
merged 3 commits into from
Jan 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 3 additions & 5 deletions .prow/scripts/test-end-to-end-batch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
set -e
set -o pipefail

export REVISION=dev

if ! cat /etc/*release | grep -q stretch; then
echo ${BASH_SOURCE} only supports Debian stretch.
echo Please change your operating system to use this script.
Expand Down Expand Up @@ -92,7 +90,7 @@ Building jars for Feast
--output-dir /root/

# Build jars for Feast
mvn --quiet --batch-mode --define skipTests=true --define revision=$REVISION clean package
mvn --quiet --batch-mode --define skipTests=true clean package

echo "
============================================================
Expand Down Expand Up @@ -144,7 +142,7 @@ management:
enabled: false
EOF

nohup java -jar core/target/feast-core-$REVISION.jar \
nohup java -jar core/target/feast-core-*-SNAPSHOT.jar \
--spring.config.location=file:///tmp/core.application.yml \
&> /var/log/feast-core.log &
sleep 35
Expand Down Expand Up @@ -198,7 +196,7 @@ spring:
web-environment: false
EOF

nohup java -jar serving/target/feast-serving-$REVISION.jar \
nohup java -jar serving/target/feast-serving-*-SNAPSHOT.jar \
--spring.config.location=file:///tmp/serving.warehouse.application.yml \
&> /var/log/feast-serving-warehouse.log &
sleep 15
Expand Down
8 changes: 3 additions & 5 deletions .prow/scripts/test-end-to-end.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
set -e
set -o pipefail

export REVISION=dev

if ! cat /etc/*release | grep -q stretch; then
echo ${BASH_SOURCE} only supports Debian stretch.
echo Please change your operating system to use this script.
Expand Down Expand Up @@ -79,7 +77,7 @@ Building jars for Feast
--output-dir /root/

# Build jars for Feast
mvn --quiet --batch-mode --define skipTests=true --define revision=$REVISION clean package
mvn --quiet --batch-mode --define skipTests=true clean package

ls -lh core/target/*jar
ls -lh serving/target/*jar
Expand Down Expand Up @@ -135,7 +133,7 @@ management:
enabled: false
EOF

nohup java -jar core/target/feast-core-$REVISION.jar \
nohup java -jar core/target/feast-core-*-SNAPSHOT.jar \
--spring.config.location=file:///tmp/core.application.yml \
&> /var/log/feast-core.log &
sleep 35
Expand Down Expand Up @@ -189,7 +187,7 @@ spring:

EOF

nohup java -jar serving/target/feast-serving-$REVISION.jar \
nohup java -jar serving/target/feast-serving-*-SNAPSHOT.jar \
--spring.config.location=file:///tmp/serving.online.application.yml \
&> /var/log/feast-serving-online.log &
sleep 15
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ build-cli:
$(MAKE) -C cli build-all

build-java:
mvn clean verify -Drevision=$(VERSION)
mvn clean verify

build-docker:
docker build -t $(REGISTRY)/feast-core:$(VERSION) -f infra/docker/core/Dockerfile .
Expand Down
6 changes: 3 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>feast</groupId>
<groupId>dev.feast</groupId>
<artifactId>feast-parent</artifactId>
<version>${revision}</version>
<version>0.3.6-SNAPSHOT</version>
</parent>

<name>Feast Core</name>
Expand All @@ -48,7 +48,7 @@

<dependencies>
<dependency>
<groupId>feast</groupId>
<groupId>dev.feast</groupId>
<artifactId>feast-ingestion</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/feast/core/config/MonitoringConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public FeastResourceCollector feastResourceCollector(
/**
* Register custom Prometheus collector that exports metrics about JVM resource usage.
*
* @return @{link {@link JVMResourceCollector}}
* @return {@link JVMResourceCollector}
*/
@Bean
public JVMResourceCollector jvmResourceCollector() {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/feast/core/service/SpecService.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public GetFeatureSetResponse getFeatureSet(GetFeatureSetRequest request) {
* possible if a project name is not set explicitly
*
* <p>The version field can be one of - '*' - This will match all versions - 'latest' - This will
* match the latest feature set version - '<number>' - This will match a specific feature set
* match the latest feature set version - '&lt;number&gt;' - This will match a specific feature set
* version. This property can only be set if both the feature set name and project name are
* explicitly set.
*
Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/feast/core/util/PackageUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ public class PackageUtil {
* handled by default in Apache Beam.
*
* <pre>
* @code
* <code>
* URL url = new URL("jar:file:/tmp/springexample/target/spring-example-1.0-SNAPSHOT.jar!/BOOT-INF/lib/beam-sdks-java-core-2.16.0.jar!/");
* </code>
* String resolvedPath = resolveSpringBootPackageClasspath(url);
* // resolvedPath should point to "/tmp/springexample/target/spring-example-1.0-SNAPSHOT/BOOT-INF/lib/beam-sdks-java-core-2.16.0.jar"
* // Note that spring-example-1.0-SNAPSHOT.jar is extracted in the process.
Expand Down
2 changes: 1 addition & 1 deletion infra/docker/core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORKDIR /build
# the existing .m2 directory to $FEAST_REPO_ROOT/.m2
#
ENV MAVEN_OPTS="-Dmaven.repo.local=/build/.m2/repository -DdependencyLocationsEnabled=false"
RUN mvn --also-make --projects core,ingestion -Drevision=$REVISION \
RUN mvn --also-make --projects core,ingestion \
-DskipTests=true --batch-mode package
#
# Unpack the jar and copy the files into production Docker image
Expand Down
2 changes: 1 addition & 1 deletion infra/docker/serving/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORKDIR /build
# the existing .m2 directory to $FEAST_REPO_ROOT/.m2
#
ENV MAVEN_OPTS="-Dmaven.repo.local=/build/.m2/repository -DdependencyLocationsEnabled=false"
RUN mvn --also-make --projects serving -Drevision=$REVISION \
RUN mvn --also-make --projects serving \
-DskipTests=true --batch-mode package

# ============================================================
Expand Down
4 changes: 2 additions & 2 deletions ingestion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>feast</groupId>
<groupId>dev.feast</groupId>
<artifactId>feast-parent</artifactId>
<version>${revision}</version>
<version>0.3.6-SNAPSHOT</version>
</parent>

<name>Feast Ingestion</name>
Expand Down
51 changes: 41 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<description>Feature Store for Machine Learning</description>
<url>${github.url}</url>

<groupId>feast</groupId>
<groupId>dev.feast</groupId>
<artifactId>feast-parent</artifactId>
<version>${revision}</version>
<version>0.3.6-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -35,7 +35,6 @@
</modules>

<properties>
<revision>0.3.2-SNAPSHOT</revision>
<github.url>https://github.com/gojek/feast</github.url>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -83,15 +82,10 @@
</issueManagement>

<distributionManagement>
<!-- TODO: use a profile like local -->
<snapshotRepository>
<id>feast-snapshot</id>
<url>file:///tmp/snapshot</url>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>feast</id>
<url>file:///tmp/snapshot</url>
</repository>
</distributionManagement>

<dependencyManagement>
Expand Down Expand Up @@ -280,6 +274,43 @@
</extensions>

<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions sdk/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

<name>Feast SDK for Java</name>
<description>SDK for registering, storing, and retrieving features</description>
<artifactId>feast-client</artifactId>
<artifactId>feast-sdk</artifactId>

<parent>
<groupId>feast</groupId>
<groupId>dev.feast</groupId>
<artifactId>feast-parent</artifactId>
<version>${revision}</version>
<version>0.3.6-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sdk/java/src/main/java/com/gojek/feast/FeastClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public GetFeastServingInfoResponse getFeastServingInfo() {
/**
* Get online features from Feast.
*
* <p>See {@link #getOnlineFeatures(List, List, str)}
* <p>See {@link #getOnlineFeatures(List, List, String)}
*
* @param features list of string feature references to retrieve, feature reference follows this
* format [project]/[name]:[version]
Expand Down
4 changes: 2 additions & 2 deletions serving/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>feast</groupId>
<groupId>dev.feast</groupId>
<artifactId>feast-parent</artifactId>
<version>${revision}</version>
<version>0.3.6-SNAPSHOT</version>
</parent>

<artifactId>feast-serving</artifactId>
Expand Down