diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5ce48712c..976f4c47c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,9 @@ jobs: uses: docker/setup-buildx-action@v3 - uses: actions/setup-java@v3 with: - java-version: 11 + java-version: | + 17 + 11 distribution: 'zulu' cache: 'gradle' - name: Prepare build variables @@ -72,3 +74,28 @@ jobs: tags: | "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-unvalidated-ubuntu" "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-unvalidated-ubuntu" + - name: Build and publish slim JRE 11 container image + # Only run this on repositories in the 'spinnaker' org, not on forks. + if: startsWith(github.repository, 'spinnaker/') + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.java11.slim + platforms: linux/amd64,linux/arm64 + push: true + tags: | + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-java11-unvalidated" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-unvalidated" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-java11-unvalidated-slim" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-unvalidated-slim" + - name: Build and publish ubuntu JRE 11 container image + # Only run this on repositories in the 'spinnaker' org, not on forks. + if: startsWith(github.repository, 'spinnaker/') + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.java11.ubuntu + push: true + tags: | + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-java11-unvalidated-ubuntu" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-unvalidated-ubuntu" \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b2b22cec3e..05001bac17 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,7 +19,9 @@ jobs: uses: docker/setup-buildx-action@v3 - uses: actions/setup-java@v3 with: - java-version: 11 + java-version: | + 17 + 11 distribution: 'zulu' cache: 'gradle' - name: Prepare build variables @@ -51,3 +53,23 @@ jobs: tags: | "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-ubuntu" "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-ubuntu" + - name: Build slim JRE 11 container image + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.java11.slim + platforms: linux/amd64,linux/arm64 + tags: | + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-java11" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-java11-slim" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-slim" + - name: Build ubuntu JRE 11 container image + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.java11.ubuntu + platforms: linux/amd64,linux/arm64 + tags: | + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-java11-ubuntu" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-ubuntu" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1cdc027a2..348f7ce649 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,9 @@ jobs: uses: docker/setup-buildx-action@v3 - uses: actions/setup-java@v3 with: - java-version: 11 + java-version: | + 17 + 11 distribution: 'zulu' cache: 'gradle' - name: Assemble release info @@ -128,6 +130,31 @@ jobs: tags: | "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-unvalidated-ubuntu" "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-${{ steps.build_variables.outputs.VERSION }}-unvalidated-ubuntu" + - name: Build and publish slim JRE 11 container image + # Only run this on repositories in the 'spinnaker' org, not on forks. + if: startsWith(github.repository, 'spinnaker/') + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.java11.slim + platforms: linux/amd64,linux/arm64 + push: true + tags: | + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-java11-unvalidated" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-java11-unvalidated-slim" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-${{ steps.build_variables.outputs.VERSION }}-java11-unvalidated-slim" + - name: Build and publish ubuntu JRE 11 container image + # Only run this on repositories in the 'spinnaker' org, not on forks. + if: startsWith(github.repository, 'spinnaker/') + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile.java11.ubuntu + platforms: linux/amd64,linux/arm64 + push: true + tags: | + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-java11-unvalidated-ubuntu" + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-${{ steps.build_variables.outputs.VERSION }}-java11-unvalidated-ubuntu" - name: Create release if: steps.release_info.outputs.SKIP_RELEASE == 'false' uses: softprops/action-gh-release@v1 diff --git a/Dockerfile.java11.slim b/Dockerfile.java11.slim new file mode 100644 index 0000000000..7a051d9f2e --- /dev/null +++ b/Dockerfile.java11.slim @@ -0,0 +1,9 @@ +FROM alpine:3.16 +LABEL maintainer="sig-platform@spinnaker.io" +RUN apk --no-cache add --update bash openjdk11-jre +RUN addgroup -S -g 10111 spinnaker +RUN adduser -S -G spinnaker -u 10111 spinnaker +COPY orca-web/build/install/orca /opt/orca +RUN mkdir -p /opt/orca/plugins && chown -R spinnaker:nogroup /opt/orca/plugins +USER spinnaker +CMD ["/opt/orca/bin/orca"] diff --git a/Dockerfile.java11.ubuntu b/Dockerfile.java11.ubuntu new file mode 100644 index 0000000000..16dfa49198 --- /dev/null +++ b/Dockerfile.java11.ubuntu @@ -0,0 +1,8 @@ +FROM ubuntu:bionic +LABEL maintainer="sig-platform@spinnaker.io" +RUN apt-get update && apt-get -y install openjdk-11-jre-headless wget +RUN adduser --system --uid 10111 --group spinnaker +COPY orca-web/build/install/orca /opt/orca +RUN mkdir -p /opt/orca/plugins && chown -R spinnaker:nogroup /opt/orca/plugins +USER spinnaker +CMD ["/opt/orca/bin/orca"] diff --git a/Dockerfile.slim b/Dockerfile.slim index 7a051d9f2e..436123ad6c 100644 --- a/Dockerfile.slim +++ b/Dockerfile.slim @@ -1,6 +1,6 @@ FROM alpine:3.16 LABEL maintainer="sig-platform@spinnaker.io" -RUN apk --no-cache add --update bash openjdk11-jre +RUN apk --no-cache add --update bash openjdk17-jre RUN addgroup -S -g 10111 spinnaker RUN adduser -S -G spinnaker -u 10111 spinnaker COPY orca-web/build/install/orca /opt/orca diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 16dfa49198..9adaa1c143 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -1,6 +1,6 @@ FROM ubuntu:bionic LABEL maintainer="sig-platform@spinnaker.io" -RUN apt-get update && apt-get -y install openjdk-11-jre-headless wget +RUN apt-get update && apt-get -y install openjdk-17-jre-headless wget RUN adduser --system --uid 10111 --group spinnaker COPY orca-web/build/install/orca /opt/orca RUN mkdir -p /opt/orca/plugins && chown -R spinnaker:nogroup /opt/orca/plugins diff --git a/build.gradle b/build.gradle index d7f711e90a..05b12f1d16 100644 --- a/build.gradle +++ b/build.gradle @@ -27,6 +27,17 @@ allprojects { group = "io.spinnaker.orca" + tasks.withType(JavaCompile).configureEach { + javaCompiler = javaToolchains.compilerFor { + languageVersion = JavaLanguageVersion.of(11) + } + } + tasks.withType(Test).configureEach { + javaLauncher = javaToolchains.launcherFor { + languageVersion = JavaLanguageVersion.of(17) + } + } + tasks.withType(JavaExec) { if (System.getProperty('DEBUG', 'false') == 'true') { jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8183' diff --git a/gradle.properties b/gradle.properties index 41e4a4afa1..ee0aaeacf4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,7 @@ fiatVersion=1.42.0 korkVersion=7.204.0 kotlinVersion=1.5.32 org.gradle.parallel=true +org.gradle.jvmargs=-Xmx6g spinnakerGradleVersion=8.31.0 targetJava11=true diff --git a/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/kato/tasks/JarDiffsTask.groovy b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/kato/tasks/JarDiffsTask.groovy index 952d16cbab..80815766bf 100644 --- a/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/kato/tasks/JarDiffsTask.groovy +++ b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/kato/tasks/JarDiffsTask.groovy @@ -19,6 +19,7 @@ package com.netflix.spinnaker.orca.kato.tasks import com.netflix.spinnaker.kork.retrofit.exceptions.SpinnakerRetrofitErrorHandler import com.netflix.spinnaker.orca.api.pipeline.models.StageExecution import com.netflix.spinnaker.orca.clouddriver.model.Instance.InstanceInfo +import retrofit.converter.JacksonConverter import java.util.concurrent.TimeUnit import java.util.regex.Matcher @@ -121,6 +122,7 @@ class JarDiffsTask implements DiffTask { RestAdapter restAdapter = new RestAdapter.Builder() .setEndpoint(address) + .setConverter(new JacksonConverter()) .setClient(new OkClient(okHttpClient)) .setErrorHandler(SpinnakerRetrofitErrorHandler.getInstance()) .build() diff --git a/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/kato/tasks/quip/AbstractQuipTask.groovy b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/kato/tasks/quip/AbstractQuipTask.groovy index 1af2fce4a0..a7ea17d467 100644 --- a/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/kato/tasks/quip/AbstractQuipTask.groovy +++ b/orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/kato/tasks/quip/AbstractQuipTask.groovy @@ -22,6 +22,8 @@ import com.netflix.spinnaker.orca.clouddriver.InstanceService import com.squareup.okhttp.OkHttpClient import retrofit.RestAdapter import retrofit.client.OkClient +import retrofit.converter.JacksonConverter + import static retrofit.RestAdapter.LogLevel.BASIC @Deprecated @@ -29,6 +31,7 @@ abstract class AbstractQuipTask implements Task { InstanceService createInstanceService(String address) { RestAdapter restAdapter = new RestAdapter.Builder() .setEndpoint(address) + .setConverter(new JacksonConverter()) .setClient(new OkClient(new OkHttpClient(retryOnConnectionFailure: false))) .setLogLevel(BASIC) .setErrorHandler(SpinnakerRetrofitErrorHandler.getInstance()) diff --git a/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/providers/aws/DeployCloudFormationStageTest.groovy b/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/providers/aws/DeployCloudFormationStageTest.groovy index 0316d8f178..77368892e2 100644 --- a/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/providers/aws/DeployCloudFormationStageTest.groovy +++ b/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/providers/aws/DeployCloudFormationStageTest.groovy @@ -43,7 +43,7 @@ class DeployCloudFormationStageTest extends Specification { cloudFormationStage.taskGraph(stage, builder) then: - builder.graph.size == graphSize + builder.graph.size() == graphSize where: isChangeSet | executeChangeSet || graphSize diff --git a/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/servergroup/support/TargetServerGroupResolverSpec.groovy b/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/servergroup/support/TargetServerGroupResolverSpec.groovy index e34a386bba..b6400d3015 100644 --- a/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/servergroup/support/TargetServerGroupResolverSpec.groovy +++ b/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/servergroup/support/TargetServerGroupResolverSpec.groovy @@ -31,6 +31,7 @@ import retrofit.client.Client import retrofit.client.Response import retrofit.converter.ConversionException import retrofit.converter.GsonConverter +import retrofit.converter.JacksonConverter import retrofit.mime.TypedString import spock.lang.Specification import spock.lang.Subject @@ -67,6 +68,7 @@ class TargetServerGroupResolverSpec extends Specification { new RestAdapter.Builder() .setEndpoint("clouddriver") .setClient(client) + .setConverter(new JacksonConverter()) .setErrorHandler(spinnakerRetrofitErrorHandler) .build() .create(OortService.class); @@ -109,6 +111,7 @@ class TargetServerGroupResolverSpec extends Specification { new RestAdapter.Builder() .setEndpoint("clouddriver") .setClient(client) + .setConverter(new JacksonConverter()) .setErrorHandler(spinnakerRetrofitErrorHandler) .build() .create(OortService.class); diff --git a/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/servergroup/support/TerminatingInstanceSupportSpec.groovy b/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/servergroup/support/TerminatingInstanceSupportSpec.groovy index 4d98df1431..59c02fe8bd 100644 --- a/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/servergroup/support/TerminatingInstanceSupportSpec.groovy +++ b/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/servergroup/support/TerminatingInstanceSupportSpec.groovy @@ -44,9 +44,9 @@ class TerminatingInstanceSupportSpec extends Specification { def results = support.remainingInstances(stage) then: - getTSGCount * cloudDriverService.getTargetServerGroup("creds", "santa-claus", "north-pole") >> [ + getTSGCount * cloudDriverService.getTargetServerGroup("creds", "santa-claus", "north-pole") >> Optional.of([ new TargetServerGroup(instances: returnedInstances) - ] + ]) results == expected where: diff --git a/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/DetermineHealthProvidersTaskSpec.groovy b/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/DetermineHealthProvidersTaskSpec.groovy index 4a66f7fd77..e6b7033f6d 100644 --- a/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/DetermineHealthProvidersTaskSpec.groovy +++ b/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/DetermineHealthProvidersTaskSpec.groovy @@ -34,7 +34,7 @@ class DetermineHealthProvidersTaskSpec extends Specification { @Subject def task = new DetermineHealthProvidersTask( - new Optional(front50Service), + Optional.of(front50Service), [], [new AmazonServerGroupCreator(), new GoogleServerGroupCreator(), new DcosServerGroupCreator()] ) diff --git a/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/cluster/ShrinkClusterTaskSpec.groovy b/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/cluster/ShrinkClusterTaskSpec.groovy index d827c357da..03c8fbc8ad 100644 --- a/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/cluster/ShrinkClusterTaskSpec.groovy +++ b/orca-clouddriver/src/test/groovy/com/netflix/spinnaker/orca/clouddriver/tasks/cluster/ShrinkClusterTaskSpec.groovy @@ -63,7 +63,7 @@ class ShrinkClusterTaskSpec extends Specification { 1 * cloudDriverService.maybeCluster('foo', 'test', 'foo-test', 'aws') >> Optional.of(cluster) (expectedItems ? 1 : 0) * katoService.requestOperations('aws', _) >> { p, ops -> - assert ops.size == expected.size() + assert ops.size() == expected.size() expected.each { expect -> assert ops.find { it.destroyServerGroup.serverGroupName == expect.name && it.destroyServerGroup.region == expect.region } } diff --git a/orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ArtifactUtilsSpec.groovy b/orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ArtifactUtilsSpec.groovy index a3d4e48104..c3308625e2 100644 --- a/orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ArtifactUtilsSpec.groovy +++ b/orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ArtifactUtilsSpec.groovy @@ -88,7 +88,7 @@ class ArtifactUtilsSpec extends Specification { then: def artifacts = artifactUtils.getArtifacts(desired) - artifacts.size == 3 + artifacts.size() == 3 artifacts.find { it.type == "1" } != null artifacts.find { it.type == "2" } != null artifacts.find { it.type == "extra" } != null @@ -122,7 +122,7 @@ class ArtifactUtilsSpec extends Specification { then: def artifacts = artifactUtils.getArtifacts(desired) - artifacts.size == 1 + artifacts.size() == 1 artifacts.find { it.type == "1" } != null where: @@ -168,7 +168,7 @@ class ArtifactUtilsSpec extends Specification { then: def artifacts = artifactUtils.getArtifacts(desired) - artifacts.size == 2 + artifacts.size() == 2 artifacts.find { it.type == "1" } != null artifacts.find { it.type == "trigger" } != null } @@ -192,7 +192,7 @@ class ArtifactUtilsSpec extends Specification { then: def artifacts = artifactUtils.getArtifacts(desired) - artifacts.size == 0 + artifacts.size() == 0 } def "should find a bound artifact from upstream stages"() { @@ -281,7 +281,7 @@ class ArtifactUtilsSpec extends Specification { then: def artifacts = artifactUtils.getAllArtifacts(execution) - artifacts.size == 3 + artifacts.size() == 3 artifacts*.type == ["2", "1", "trigger"] } @@ -324,7 +324,7 @@ class ArtifactUtilsSpec extends Specification { then: def artifacts = artifactUtils.getArtifactsForPipelineId(pipelineId, executionCriteria) - artifacts.size == 3 + artifacts.size() == 3 artifacts*.type == ["2", "1", "trigger"] def emptyArtifacts = artifactUtils.getArtifactsForPipelineId(pipelineId, executionTerminalCriteria) @@ -362,7 +362,7 @@ class ArtifactUtilsSpec extends Specification { then: def artifacts = artifactUtils.getArtifactsForPipelineIdWithoutStageRef(pipelineId, "2", expectedExecutionCriteria) - artifacts.size == 2 + artifacts.size() == 2 artifacts*.type == ["1", "trigger"] } diff --git a/orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ContextParameterProcessorSpec.groovy b/orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ContextParameterProcessorSpec.groovy index d11d8f4d4d..d3476ac989 100644 --- a/orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ContextParameterProcessorSpec.groovy +++ b/orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ContextParameterProcessorSpec.groovy @@ -452,7 +452,7 @@ class ContextParameterProcessorSpec extends Specification { def result = contextParameterProcessor.process(source, contextParameterProcessor.buildExecutionContext(execution), true) then: - result.deployed.size == 2 + result.deployed.size() == 2 result.deployed.serverGroup == ["flex-test-v043", "flex-prestaging-v011"] result.deployed.region == ["us-east-1", "us-west-1"] result.deployed.ami == ["ami-06362b6e", "ami-f759b7b3"] @@ -601,7 +601,7 @@ class ContextParameterProcessorSpec extends Specification { def result = contextParameterProcessor.process(source, contextParameterProcessor.buildExecutionContext(execution), true) then: - result.deployed.size == 2 + result.deployed.size() == 2 result.deployed.serverGroup == ["flex-test-v043", "flex-prestaging-v011"] result.deployed.region == ["us-east-1", "us-west-1"] result.deployed.ami == ["ami-06362b6e", "ami-f759b7b3"] @@ -612,7 +612,7 @@ class ContextParameterProcessorSpec extends Specification { result = contextParameterProcessor.process(source, contextParameterProcessor.buildExecutionContext(execution), true) then: 'should only consider the specified stage name/id' - result.deployed.size == 1 + result.deployed.size() == 1 result.deployed.serverGroup == ["flex-test-v043"] result.deployed.region == ["us-east-1"] result.deployed.ami == ["ami-06362b6e"] diff --git a/orca-front50/src/test/groovy/com/netflix/spinnaker/orca/front50/tasks/MonitorPipelineTaskSpec.groovy b/orca-front50/src/test/groovy/com/netflix/spinnaker/orca/front50/tasks/MonitorPipelineTaskSpec.groovy index d46d619327..957495ce1b 100644 --- a/orca-front50/src/test/groovy/com/netflix/spinnaker/orca/front50/tasks/MonitorPipelineTaskSpec.groovy +++ b/orca-front50/src/test/groovy/com/netflix/spinnaker/orca/front50/tasks/MonitorPipelineTaskSpec.groovy @@ -104,7 +104,7 @@ class MonitorPipelineTaskSpec extends Specification { then: result.outputs.containsKey("artifacts") - result.outputs["artifacts"].size == 1 + result.outputs["artifacts"].size() == 1 } def "propagates pipeline exceptions"() { diff --git a/orca-igor/src/test/groovy/com/netflix/spinnaker/orca/igor/tasks/GetCommitsTaskSpec.groovy b/orca-igor/src/test/groovy/com/netflix/spinnaker/orca/igor/tasks/GetCommitsTaskSpec.groovy index 234c727038..ff13049e64 100644 --- a/orca-igor/src/test/groovy/com/netflix/spinnaker/orca/igor/tasks/GetCommitsTaskSpec.groovy +++ b/orca-igor/src/test/groovy/com/netflix/spinnaker/orca/igor/tasks/GetCommitsTaskSpec.groovy @@ -211,7 +211,7 @@ class GetCommitsTaskSpec extends Specification { boolean assertResults(TaskResult result, ExecutionStatus taskStatus) { assert result.status == taskStatus - assert result.context.commits.size == 2 + assert result.context.commits.size() == 2 assert result.context.commits[0].displayId == "abcdab" assert result.context.commits[0].id == "abcdabcdabcdabcd" assert result.context.commits[0].authorDisplayName == "Joe Coder" @@ -421,7 +421,7 @@ class GetCommitsTaskSpec extends Specification { then: result.status == taskStatus - result.context.commits.size == 0 + result.context.commits.size() == 0 where: app = "myapp" @@ -472,7 +472,7 @@ class GetCommitsTaskSpec extends Specification { then: result.status == taskStatus - result.context.commits.size == 0 + result.context.commits.size() == 0 where: app = "myapp" @@ -513,7 +513,7 @@ class GetCommitsTaskSpec extends Specification { then: result.status == SUCCEEDED - result.context.commits.size == 0 + result.context.commits.size() == 0 where: app = "myapp" diff --git a/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy b/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy index c2829df10a..60b229df94 100644 --- a/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy +++ b/orca-pipelinetemplate/src/test/groovy/com/netflix/spinnaker/orca/pipelinetemplate/PipelineTemplatePipelinePreprocessorSpec.groovy @@ -344,7 +344,7 @@ class PipelineTemplatePipelinePreprocessorSpec extends Specification { def result = subject.process(template) then: - result.stages.size == 4 + result.stages.size() == 4 result.stages*.name.toSet() == ["Wait", "Deploy to cluster-1", "Deploy to cluster-2", "Deploy to cluster-3"].toSet() } diff --git a/orca-retrofit/src/test/groovy/com/netflix/spinnaker/orca/retrofit/exceptions/BaseRetrofitExceptionHandlerSpec.groovy b/orca-retrofit/src/test/groovy/com/netflix/spinnaker/orca/retrofit/exceptions/BaseRetrofitExceptionHandlerSpec.groovy index 934d0bf160..debf6e5b09 100644 --- a/orca-retrofit/src/test/groovy/com/netflix/spinnaker/orca/retrofit/exceptions/BaseRetrofitExceptionHandlerSpec.groovy +++ b/orca-retrofit/src/test/groovy/com/netflix/spinnaker/orca/retrofit/exceptions/BaseRetrofitExceptionHandlerSpec.groovy @@ -20,6 +20,7 @@ import retrofit.RestAdapter import retrofit.RetrofitError import retrofit.client.Client import retrofit.client.Response +import retrofit.converter.JacksonConverter import retrofit.mime.TypedString import spock.lang.Specification import spock.lang.Subject @@ -60,6 +61,7 @@ class BaseRetrofitExceptionHandlerSpec extends Specification { def api = new RestAdapter.Builder() .setEndpoint("http://localhost:1337") .setClient(client) + .setConverter(new JacksonConverter()) .build() .create(DummyRetrofitApi) @@ -85,6 +87,7 @@ class BaseRetrofitExceptionHandlerSpec extends Specification { def api = new RestAdapter.Builder() .setEndpoint("http://localhost:1337") .setClient(client) + .setConverter(new JacksonConverter()) .build() .create(DummyRetrofitApi) @@ -114,6 +117,7 @@ class BaseRetrofitExceptionHandlerSpec extends Specification { def api = new RestAdapter.Builder() .setEndpoint("http://localhost:1337") .setClient(client) + .setConverter(new JacksonConverter()) .build() .create(DummyRetrofitApi) @@ -142,6 +146,7 @@ class BaseRetrofitExceptionHandlerSpec extends Specification { and: def api = new RestAdapter.Builder() .setEndpoint("http://localhost:1337") + .setConverter(new JacksonConverter()) .setClient(client) .build() .create(DummyRetrofitApi) diff --git a/orca-retrofit/src/test/java/com/netflix/spinnaker/orca/retrofit/exceptions/SpinnakerServerExceptionHandlerTest.java b/orca-retrofit/src/test/java/com/netflix/spinnaker/orca/retrofit/exceptions/SpinnakerServerExceptionHandlerTest.java index dc9a60de78..3d4af3c1df 100644 --- a/orca-retrofit/src/test/java/com/netflix/spinnaker/orca/retrofit/exceptions/SpinnakerServerExceptionHandlerTest.java +++ b/orca-retrofit/src/test/java/com/netflix/spinnaker/orca/retrofit/exceptions/SpinnakerServerExceptionHandlerTest.java @@ -43,6 +43,7 @@ import retrofit.client.Request; import retrofit.client.Response; import retrofit.converter.GsonConverter; +import retrofit.converter.JacksonConverter; import retrofit.mime.TypedString; class SpinnakerServerExceptionHandlerTest { @@ -186,6 +187,7 @@ private static Stream exceptionsForRetryTest() throws Exception { new RestAdapter.Builder() .setEndpoint(URL) .setClient(client) + .setConverter(new JacksonConverter()) .setErrorHandler(SpinnakerRetrofitErrorHandler.getInstance()) .build() .create(DummyRetrofitApi.class);