Skip to content

Commit

Permalink
chore(dependencies): externalize versions to properties (#550)
Browse files Browse the repository at this point in the history
updates kork to 5.3.4
updates spinnaker-gradle-project to 6.5.0
updates fiat to 1.0.4
  • Loading branch information
cfieber committed May 17, 2019
1 parent b55709f commit 0bacac7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
8 changes: 2 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,15 @@
*/

buildscript {
ext {
korkVersion = "5.0.0"
fiatVersion = "1.0.0"
}
repositories {
jcenter()
maven { url 'https://spinnaker.bintray.com/gradle/' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.netflix.spinnaker.gradle:spinnaker-dev-plugin:6.3.0"
classpath "com.netflix.spinnaker.gradle:spinnaker-dev-plugin:$spinnakerGradleVersion"
if (Boolean.valueOf(enablePublishing)) {
classpath "com.netflix.spinnaker.gradle:spinnaker-gradle-project:6.3.0"
classpath "com.netflix.spinnaker.gradle:spinnaker-gradle-project:$spinnakerGradleVersion"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import rx.Observable;

public interface OrcaService {

@POST("/orchestrate")
Observable<TriggerResponse> trigger(@Body Pipeline pipeline);

Expand All @@ -40,7 +41,7 @@ public interface OrcaService {

@POST("/orchestrate")
Observable<TriggerResponse> trigger(
@Body Pipeline pipeline, @Header(AuthenticatedRequest.SPINNAKER_USER) String runAsUser);
@Body Pipeline pipeline, @Header(TriggerResponse.X_SPINNAKER_USER) String runAsUser);

@GET("/pipelines")
Observable<Collection<PipelineResponse>> getLatestPipelineExecutions(
Expand All @@ -58,6 +59,16 @@ Observable<Collection<PipelineResponse>> getLatestPipelineExecutions(
@Query("limit") Integer limit);

class TriggerResponse {
// workaround for not having a constant value for reference via annotation:
static final String X_SPINNAKER_USER = "X-SPINNAKER-USER";

static {
// TODO(cf): if this actually fails you will all thank me I swear
if (!X_SPINNAKER_USER.equals(AuthenticatedRequest.Header.USER.getHeader())) {
throw new IllegalStateException("The header changed. Why did the header change. Whyyy");
}
}

private String ref;

public TriggerResponse() {
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
org.gradle.parallel=true
enablePublishing=false
fiatVersion=1.0.4
korkVersion=5.3.4
spinnakerGradleVersion=6.5.0
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 0bacac7

Please sign in to comment.