diff --git a/.harness/ffgolangserversdk.yaml b/.harness/ffgolangserversdk.yaml index c44b13b..2347ced 100644 --- a/.harness/ffgolangserversdk.yaml +++ b/.harness/ffgolangserversdk.yaml @@ -91,7 +91,7 @@ pipeline: echo "View Results Here: https://sonar.harness.io/dashboard?id=harness_ff-golang-server-sdk_AYSkVwnLWr37sP7QAgtQ" - stepGroup: - name: Testgrid image - Release + name: Testgrid image identifier: Testgrid_image steps: - step: @@ -107,38 +107,86 @@ pipeline: spec: branch: main description: Get the source code for ff-sdk-testgrid so we can build the go test grid container - - step: - type: GitClone - name: Copy SDK code - identifier: Copy_SDK_code - spec: - connectorRef: ffsdks - repoName: ff-golang-server-sdk - cloneDirectory: ff-sdk-testgrid/go/ff-golang-server-sdk - build: - type: tag - spec: - tag: <+codebase.tag> - description: Copy ff-golang-server-sdk code to the docker build context - - step: - type: BuildAndPushGCR - name: Build And Push testgrid image to GCR - identifier: Build_And_Push_testgrid_image_to_GCR - spec: - connectorRef: platform205701 - host: us.gcr.io - projectID: platform-205701 - imageName: ff-testgrid-go - tags: - - <+codebase.tag> - dockerfile: ff-sdk-testgrid/go/Dockerfile - context: ff-sdk-testgrid/go - buildArgs: - SDK_VERSION: <+codebase.tag> - BUILD_MODE: local + - parallel: + - stepGroup: + name: Release + identifier: Release + steps: + - step: + type: GitClone + name: Copy SDK code - Release + identifier: Copy_SDK_code + spec: + connectorRef: ffsdks + repoName: ff-golang-server-sdk + cloneDirectory: ff-sdk-testgrid/go/ff-golang-server-sdk + build: + type: tag + spec: + tag: <+codebase.tag> + description: Copy ff-golang-server-sdk code to the docker build context + - step: + type: BuildAndPushGCR + name: Build And Push testgrid image to GCR + identifier: Build_And_Push_testgrid_image_to_GCR + spec: + connectorRef: platform205701 + host: us.gcr.io + projectID: platform-205701 + imageName: ff-testgrid-go + tags: + - <+codebase.tag> + dockerfile: ff-sdk-testgrid/go/Dockerfile + context: ff-sdk-testgrid/go + buildArgs: + SDK_VERSION: <+codebase.tag> + BUILD_MODE: local + when: + stageStatus: Success + condition: "!empty(<+codebase.tag>)" + - stepGroup: + name: Pull Request + identifier: Pull_Request + steps: + - step: + type: GitClone + name: Copy SDK Code + identifier: Copy_SDK_Code + spec: + connectorRef: ffsdks + repoName: ff-golang-server-sdk + cloneDirectory: ff-sdk-testgrid/go/ff-golang-server-sdk + build: + type: branch + spec: + branch: <+trigger.sourceBranch> + when: + stageStatus: Success + - step: + type: BuildAndPushGCR + name: Build And Push testgrid image + identifier: Build_And_Push_testgrid_image + spec: + connectorRef: platform205701 + host: us.gcr.io + projectID: platform-205701 + imageName: ff-testgrid-go + tags: + - <+trigger.commitSha> + dockerfile: ff-sdk-testgrid/go/Dockerfile + context: ff-sdk-testgrid/go + buildArgs: + SDK_VERSION: v0.1.24 + BUILD_MODE: local + resources: + limits: + memory: 10G + cpu: "10" + when: + stageStatus: Success + condition: <+stage.variables.pull_request> when: stageStatus: Success - condition: "!empty(<+codebase.tag>)" - step: type: Run name: CVE scan @@ -238,6 +286,17 @@ pipeline: spec: connectorRef: DockerHub image: docker:dind + variables: + - name: pull_request + type: String + description: "" + required: false + value: <+input>.allowedValues(true,false) + - name: release + type: String + description: "" + required: false + value: <+input>.allowedValues(true,false) - stage: name: Publish Release Notes identifier: Publish_Release_Notes diff --git a/.harness/pull_request_input_set.yaml b/.harness/pull_request_input_set.yaml index 17c7503..a3f2f4c 100644 --- a/.harness/pull_request_input_set.yaml +++ b/.harness/pull_request_input_set.yaml @@ -1,5 +1,6 @@ inputSet: name: pull_request_input_set + tags: {} identifier: pull_request_input_set orgIdentifier: Feature_Flag projectIdentifier: FFPipelines @@ -13,14 +14,24 @@ inputSet: spec: branch: <+trigger.branch> stages: + - stage: + identifier: Build + type: CI + variables: + - name: pull_request + type: String + value: "true" + - name: release + type: String + value: "false" - stage: identifier: Publish_Release_Notes type: Approval variables: - name: release type: String + default: "false" value: "false" - name: pull_request type: String value: "true" - object Object: pipeline.properties.ci.codebase