-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #486 from Netflix/publishing-for-2.4.x
Upgrade nebula.netflixoss to replace bintray publication and update TravisCI Secrets
- Loading branch information
Showing
23 changed files
with
471 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
- openjdk8 | ||
sudo: false | ||
install: "./installViaTravis.sh" | ||
script: "./buildViaTravis.sh" | ||
env: | ||
global: | ||
- secure: mprd3lRQDzNFIqWJ/hhHt84Oo1rQFv5Hp2GyySTx/xPiu2Qv6F+C0YOHTHIT2+BxxW/7580w/8e6L8YLxiVX0d2J8YwQm7tPoc4WN3kV9K6U/LTdVmNAePNyeMq1R13CPAguDVG2CY4+Y08rdU7OYDuL1mQFHzPmvhGzLnN4kiE= | ||
- secure: INE6Zlu2EMfRZI13F8B4RyKkmvtaMA8K5bMYwRPWDJ+PUnGUfU27xIjx8mY+dd6A2JfSeeoF7dkOko4xi+PiiayY2Byi8fneja1j01Du7l0okBaeROGlLscLid2ME0yDCql06vERhCdIDEBMpZzVu8GbqpZ1z/x0JQ0YgBiMVEc= | ||
- secure: OumwxBfa3lOrT2BHRx9a9Ppxiua0IbEtRFs2CQHCWOW6iYRLDavLqya+oMPvx+gAlZRX54VTYuuxh858dxR8O94xPi4NvZ/POvoTdgU1MNekBqYsuWys3B4Dw8CMrrpfzvtD8tWe8TkgwGpzzpRuEzQ6bvh0uCAmiQ0kQhKA8+0= | ||
- secure: TeSjCxSjlH0fE30WoBWOPIWPMMn66v6KGAMbUGPO1Z98q1AXptmcFnAob0of8Q/HLkR6Paxtl4r4yt35pqakw40M6s5w4O2PeXPArZZE+qBRR9izRpXIPq+jAIZwabYkEgLMhF3u3VOIYmP94hGvFfddtuTF8UmqkEeK1/AmruU= | ||
- secure: n03qjQU2tBwKeFNw29R0Xfj1wUVB4/Lccchoha01eFdFTUDUjcjlHRk2hzDb2W+7mVJWjvgLTtPMq2nhu9AjXA1IYnK0CdU1mi5EQc9B4nRUl95ChOe7AQcG53JX+JDwQMaF+nVP/cejTS1BTbduB1AMEoyZp1nKGEf1bqaiAA8= | ||
- secure: oib8WzNknT4A26RYKTPGuksyEnSPei0ww2uFFroMFJebInlVKxYxbH3Tua3XiSLcKE/oyiNIMOVVTIcb4WprdPYGOToFXNWFpE2c2koeo2acUldCrZUoX8dJ+qkoVC3y9h8c5ghNdTZxwy3jdZYIK6OqT2X5wMmEjBXZ01wDOo4= | ||
- secure: FeZcG11GkkdB8EgALMzx1dJRx5GhEj9Ap0MHULUsYiczZmLwIlkQ92gzV9xHCRpIISigWnxNS9DqGekpxZQtUqw+O9cRAfuBUsiB4Q03IrmRSFc52DL3UgKULtRBds5VNC5JmrEKKAMNACVdPj17ZGRatuR2kh6NV4/NeFvGKGw= | ||
- secure: m+IG6W8pjakNfXNyrTwqwOHkYkl3IL/OITgWDcz7OQXR91anrtObO2ujyRGb4abmUo76McTXY9nnQQ/fR9skrQCyt2dTP5gtQPm9kklI+Za2Pl/M3l+LYe3N2SY1JkDu86hiWGmYnSYqc8XgtsuBQAxESszBRIZPs29Yuoz8buE= | ||
- secure: gxBi/yZu/DLPb4neAt7saSLXb308Tg1Ss3k1BXWukxwh9zGBp1eGZ5EWJG1hvnBHDQbVQYJBkaH7/hZdSP0GJrEKW4O6+E90bf0pG0mVVfMVUIlZDRdgyatMN6eVj+/7cmB6K71wuji5ZNn3vvtSwMnLdfkLCoVqgbgwdGecj0s= | ||
- secure: Z1e3y/jp0t4iBwKACzJ/B3nizD5aVMUNhc/+zSx8J8jh+iM0PyjKbA1fqNbBi+UODiOSCqw/drZnHvXqvy5fecZ7EssD6ULQTKhhn21NsrrPJlVMPCnaZY/R1MeTNC9hG4Il9MzcNIlqSAf0ztnfGHEiFs9Idc2Q4bPJgH2RM5M= | ||
cache: | ||
directories: | ||
- "$HOME/.gradle/caches" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
#!/bin/bash | ||
# This script will build the project. | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" | ||
./gradlew assemble | ||
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then | ||
echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' | ||
./gradlew -Prelease.travisci=true assemble | ||
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then | ||
echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' | ||
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble | ||
else | ||
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' | ||
./gradlew assemble | ||
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then | ||
echo "Decrypting publishing credentials" | ||
openssl aes-256-cbc -k "$NETFLIX_OSS_SIGNING_FILE_PASSWORD" -in secrets/signing-key.enc -out secrets/signing-key -d | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
ribbon-evcache/src/test/java/com/netflix/ribbon/proxy/sample/HystrixHandlers.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright 2014 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.ribbon.proxy.sample; | ||
|
||
import com.netflix.hystrix.HystrixInvokableInfo; | ||
import com.netflix.ribbon.ServerError; | ||
import com.netflix.ribbon.UnsuccessfulResponseException; | ||
import com.netflix.ribbon.http.HttpResponseValidator; | ||
import com.netflix.ribbon.hystrix.FallbackHandler; | ||
import io.netty.buffer.ByteBuf; | ||
import io.reactivex.netty.protocol.http.client.HttpClientResponse; | ||
import rx.Observable; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* @author Tomasz Bak | ||
*/ | ||
public class HystrixHandlers { | ||
|
||
public static class SampleHttpResponseValidator implements HttpResponseValidator { | ||
|
||
@Override | ||
public void validate(HttpClientResponse<ByteBuf> response) throws UnsuccessfulResponseException, ServerError { | ||
} | ||
} | ||
|
||
public static class MovieFallbackHandler implements FallbackHandler<Movie> { | ||
|
||
@Override | ||
public Observable<Movie> getFallback(HystrixInvokableInfo<?> hystrixInfo, Map<String, Object> requestProperties) { | ||
return null; | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
ribbon-evcache/src/test/java/com/netflix/ribbon/proxy/sample/Movie.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.netflix.ribbon.proxy.sample; | ||
|
||
public class Movie { | ||
} |
179 changes: 179 additions & 0 deletions
179
ribbon-evcache/src/test/java/com/netflix/ribbon/proxy/sample/MovieServiceInterfaces.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
package com.netflix.ribbon.proxy.sample; | ||
|
||
import com.netflix.ribbon.RibbonRequest; | ||
import com.netflix.ribbon.proxy.annotation.*; | ||
import com.netflix.ribbon.proxy.annotation.ClientProperties.Property; | ||
import com.netflix.ribbon.proxy.annotation.Http.Header; | ||
import com.netflix.ribbon.proxy.annotation.Http.HttpMethod; | ||
import com.netflix.ribbon.proxy.sample.HystrixHandlers.MovieFallbackHandler; | ||
import com.netflix.ribbon.proxy.sample.HystrixHandlers.SampleHttpResponseValidator; | ||
import io.netty.buffer.ByteBuf; | ||
import rx.Observable; | ||
|
||
import java.util.concurrent.atomic.AtomicReference; | ||
|
||
import static com.netflix.ribbon.proxy.sample.ResourceGroupClasses.SampleHttpResourceGroup; | ||
|
||
/** | ||
* @author Tomasz Bak | ||
*/ | ||
public class MovieServiceInterfaces { | ||
|
||
@ClientProperties(properties = { | ||
@Property(name="ReadTimeout", value="2000"), | ||
@Property(name="ConnectTimeout", value="1000"), | ||
@Property(name="MaxAutoRetriesNextServer", value="2") | ||
}, exportToArchaius = true) | ||
public static interface SampleMovieService { | ||
|
||
@TemplateName("findMovieById") | ||
@Http( | ||
method = HttpMethod.GET, | ||
uri = "/movies/{id}", | ||
headers = { | ||
@Header(name = "X-MyHeader1", value = "value1.1"), | ||
@Header(name = "X-MyHeader1", value = "value1.2"), | ||
@Header(name = "X-MyHeader2", value = "value2") | ||
}) | ||
@Hystrix( | ||
cacheKey = "findMovieById/{id}", | ||
validator = SampleHttpResponseValidator.class, | ||
fallbackHandler = MovieFallbackHandler.class) | ||
@CacheProvider(key = "findMovieById_{id}", provider = SampleCacheProviderFactory.class) | ||
RibbonRequest<ByteBuf> findMovieById(@Var("id") String id); | ||
|
||
@TemplateName("findRawMovieById") | ||
@Http(method = HttpMethod.GET, uri = "/rawMovies/{id}") | ||
RibbonRequest<ByteBuf> findRawMovieById(@Var("id") String id); | ||
|
||
@TemplateName("findMovie") | ||
@Http(method = HttpMethod.GET, uri = "/movies?name={name}&author={author}") | ||
RibbonRequest<ByteBuf> findMovie(@Var("name") String name, @Var("author") String author); | ||
|
||
@TemplateName("registerMovie") | ||
@Http(method = HttpMethod.POST, uri = "/movies") | ||
@Hystrix(cacheKey = "registerMovie", fallbackHandler = MovieFallbackHandler.class) | ||
@ContentTransformerClass(MovieTransformer.class) | ||
RibbonRequest<ByteBuf> registerMovie(@Content Movie movie); | ||
|
||
@Http(method = HttpMethod.PUT, uri = "/movies/{id}") | ||
@ContentTransformerClass(MovieTransformer.class) | ||
RibbonRequest<ByteBuf> updateMovie(@Var("id") String id, @Content Movie movie); | ||
|
||
@Http(method = HttpMethod.PATCH, uri = "/movies/{id}") | ||
@ContentTransformerClass(MovieTransformer.class) | ||
RibbonRequest<ByteBuf> updateMoviePartial(@Var("id") String id, @Content Movie movie); | ||
|
||
@TemplateName("registerTitle") | ||
@Http(method = HttpMethod.POST, uri = "/titles") | ||
@Hystrix(cacheKey = "registerTitle", fallbackHandler = MovieFallbackHandler.class) | ||
RibbonRequest<ByteBuf> registerTitle(@Content String title); | ||
|
||
@TemplateName("registerByteBufBinary") | ||
@Http(method = HttpMethod.POST, uri = "/binaries/byteBuf") | ||
@Hystrix(cacheKey = "registerByteBufBinary", fallbackHandler = MovieFallbackHandler.class) | ||
RibbonRequest<ByteBuf> registerByteBufBinary(@Content ByteBuf binary); | ||
|
||
@TemplateName("registerByteArrayBinary") | ||
@Http(method = HttpMethod.POST, uri = "/binaries/byteArray") | ||
@Hystrix(cacheKey = "registerByteArrayBinary", fallbackHandler = MovieFallbackHandler.class) | ||
RibbonRequest<ByteBuf> registerByteArrayBinary(@Content byte[] binary); | ||
|
||
@TemplateName("deleteMovie") | ||
@Http(method = HttpMethod.DELETE, uri = "/movies/{id}") | ||
RibbonRequest<ByteBuf> deleteMovie(@Var("id") String id); | ||
} | ||
|
||
public static interface ShortMovieService { | ||
@TemplateName("findMovieById") | ||
@Http(method = HttpMethod.GET, uri = "/movies/{id}") | ||
RibbonRequest<ByteBuf> findMovieById(@Var("id") String id); | ||
|
||
@TemplateName("findMovieById") | ||
@Http(method = HttpMethod.GET, uri = "/movies") | ||
RibbonRequest<ByteBuf> findAll(); | ||
} | ||
|
||
public static interface BrokenMovieService { | ||
|
||
@Http(method = HttpMethod.GET) | ||
Movie returnTypeNotRibbonRequest(); | ||
|
||
Movie missingHttpAnnotation(); | ||
|
||
@Http(method = HttpMethod.GET) | ||
RibbonRequest<ByteBuf> multipleContentParameters(@Content Movie content1, @Content Movie content2); | ||
} | ||
|
||
@ResourceGroup(name = "testResourceGroup") | ||
public static interface SampleMovieServiceWithResourceGroupNameAnnotation { | ||
|
||
} | ||
|
||
@ResourceGroup(resourceGroupClass = SampleHttpResourceGroup.class) | ||
public static interface SampleMovieServiceWithResourceGroupClassAnnotation { | ||
|
||
} | ||
|
||
@ResourceGroup(name = "testResourceGroup", resourceGroupClass = SampleHttpResourceGroup.class) | ||
public static interface BrokenMovieServiceWithResourceGroupNameAndClassAnnotation { | ||
|
||
} | ||
|
||
@ResourceGroup(name = "testResourceGroup") | ||
public static interface TemplateNameDerivedFromMethodName { | ||
@Http(method = HttpMethod.GET, uri = "/template") | ||
RibbonRequest<ByteBuf> myTemplateName(); | ||
} | ||
|
||
@ResourceGroup(name = "testResourceGroup") | ||
public static interface HystrixOptionalAnnotationValues { | ||
|
||
@TemplateName("hystrix1") | ||
@Http(method = HttpMethod.GET, uri = "/hystrix/1") | ||
@Hystrix(cacheKey = "findMovieById/{id}") | ||
RibbonRequest<ByteBuf> hystrixWithCacheKeyOnly(); | ||
|
||
@TemplateName("hystrix2") | ||
@Http(method = HttpMethod.GET, uri = "/hystrix/2") | ||
@Hystrix(validator = SampleHttpResponseValidator.class) | ||
RibbonRequest<ByteBuf> hystrixWithValidatorOnly(); | ||
|
||
@TemplateName("hystrix3") | ||
@Http(method = HttpMethod.GET, uri = "/hystrix/3") | ||
@Hystrix(fallbackHandler = MovieFallbackHandler.class) | ||
RibbonRequest<ByteBuf> hystrixWithFallbackHandlerOnly(); | ||
|
||
} | ||
|
||
@ResourceGroup(name = "testResourceGroup") | ||
public static interface PostsWithDifferentContentTypes { | ||
|
||
@TemplateName("rawContentSource") | ||
@Http(method = HttpMethod.POST, uri = "/content/rawContentSource") | ||
@ContentTransformerClass(MovieTransformer.class) | ||
RibbonRequest<ByteBuf> postwithRawContentSource(AtomicReference<Object> arg1, int arg2, @Content Observable<Movie> movie); | ||
|
||
@TemplateName("byteBufContent") | ||
@Http(method = HttpMethod.POST, uri = "/content/byteBufContent") | ||
RibbonRequest<ByteBuf> postwithByteBufContent(@Content ByteBuf byteBuf); | ||
|
||
@TemplateName("byteArrayContent") | ||
@Http(method = HttpMethod.POST, uri = "/content/byteArrayContent") | ||
RibbonRequest<ByteBuf> postwithByteArrayContent(@Content byte[] bytes); | ||
|
||
@TemplateName("stringContent") | ||
@Http(method = HttpMethod.POST, uri = "/content/stringContent") | ||
RibbonRequest<ByteBuf> postwithStringContent(@Content String content); | ||
|
||
@TemplateName("movieContent") | ||
@Http(method = HttpMethod.POST, uri = "/content/movieContent") | ||
@ContentTransformerClass(MovieTransformer.class) | ||
RibbonRequest<ByteBuf> postwithMovieContent(@Content Movie movie); | ||
|
||
@TemplateName("movieContentBroken") | ||
@Http(method = HttpMethod.POST, uri = "/content/movieContentBroken") | ||
RibbonRequest<ByteBuf> postwithMovieContentBroken(@Content Movie movie); | ||
|
||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
ribbon-evcache/src/test/java/com/netflix/ribbon/proxy/sample/MovieTransformer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2014 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.ribbon.proxy.sample; | ||
|
||
import io.netty.buffer.ByteBuf; | ||
import io.netty.buffer.ByteBufAllocator; | ||
import io.reactivex.netty.channel.ContentTransformer; | ||
|
||
/** | ||
* @author Tomasz Bak | ||
*/ | ||
public class MovieTransformer implements ContentTransformer<MovieTransformer> { | ||
@Override | ||
public ByteBuf call(MovieTransformer toTransform, ByteBufAllocator byteBufAllocator) { | ||
return null; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
ribbon-evcache/src/test/java/com/netflix/ribbon/proxy/sample/ResourceGroupClasses.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.netflix.ribbon.proxy.sample; | ||
|
||
import com.netflix.ribbon.http.HttpResourceGroup; | ||
|
||
/** | ||
* @author Tomasz Bak | ||
*/ | ||
public class ResourceGroupClasses { | ||
public static class SampleHttpResourceGroup extends HttpResourceGroup { | ||
public SampleHttpResourceGroup() { | ||
super("myTestGroup"); | ||
} | ||
} | ||
} |
Oops, something went wrong.