From b562fc302f115a2fdeba32a4635fab14f2c3bf43 Mon Sep 17 00:00:00 2001 From: Rohan Gupta Date: Thu, 7 Mar 2024 16:10:22 -0800 Subject: [PATCH 01/11] changes --- approved/pipeline/failure-strategy.yaml | 168 ++++++++++++++++++++++++ approved/pipeline/pipeline.yaml | 75 +++++++++++ approved/pipeline/stage.yaml | 155 ++++++++++++++++++++++ approved/pipeline/step-group.yaml | 30 +++++ approved/pipeline/step-parallel.yaml | 30 +++++ approved/pipeline/step.yaml | 52 ++++++++ samples/pipeline.yaml | 15 --- 7 files changed, 510 insertions(+), 15 deletions(-) create mode 100644 approved/pipeline/failure-strategy.yaml create mode 100644 approved/pipeline/pipeline.yaml create mode 100644 approved/pipeline/stage.yaml create mode 100644 approved/pipeline/step-group.yaml create mode 100644 approved/pipeline/step-parallel.yaml create mode 100644 approved/pipeline/step.yaml diff --git a/approved/pipeline/failure-strategy.yaml b/approved/pipeline/failure-strategy.yaml new file mode 100644 index 0000000..10b5465 --- /dev/null +++ b/approved/pipeline/failure-strategy.yaml @@ -0,0 +1,168 @@ +# step with failure strategy + +pipeline: + stages: + - steps: + - run: + script: go test + on-failure: + errors: all + action: ignore +--- +# sample pipeline with a retry failure strategy +# that fails if all retry attempts fail. + +pipeline: + stages: + - steps: + - run: + script: go test + container: golang + on-failure: + errors: [ unknown ] + action: + retry: + attempts: 5 + interval: 10s + failure-action: fail + +--- + +# sample pipeline with a retry failure strategy +# that demonstrates multiple, staggered intervals. + +pipeline: + stages: + - steps: + - run: + script: go test + container: golang + on-failure: + errors: [ unknown ] + action: + retry: + attempts: 5 + interval: [ 10s, 30s, 1m, 5m, 10m ] + failure-action: fail + +--- + +# sample pipeline with retry failure strategy with a +# complex failure action. + +pipeline: + stages: + - steps: + - run: + script: go test + container: golang + on-failure: + errors: [ unknown ] + action: + retry: + attempts: 5 + interval: 10s + failure-action: + manual-intervention: + timeout: 60m + timeout-action: fail + +--- + +# sample pipeline with simplified retry strategy +# syntax that should apply sane defaults. + +pipeline: + stages: + - steps: + - run: + script: go test + container: golang + on-failure: + errors: all + action: retry + +--- + +# sample pipeline with manual-intervention +# failure strategy that fails on timeout. + +pipeline: + stages: + - steps: + - run: + script: go test + container: golang + on-failure: + errors: [ all ] + action: + manual-intervention: + timeout: 30m + timeout-action: fail + +--- + +# sample pipeline with manual-intervention +# failure strategy with a complex timeout +# action. + +pipeline: + stages: + - steps: + - run: + script: go test + container: golang + on-failure: + errors: [ all ] + action: + manual-intervention: + timeout: 30m + timeout-action: + retry: + attempts: 10 + interval: 30s + failure-action: success +--- + +# sample pipeline with a basic failure strategy at the stage +# level that aborts on all errors. + +pipeline: + stages: + - steps: + - run: + script: go test + container: golang + on-failure: + errors: all + action: abort + +--- + +# sample pipeline with a basic failure strategy at the step +# level that aborts on all errors. + +pipeline: + stages: + - steps: + - run: + script: go test + container: golang + on-failure: + errors: all + action: abort + +--- + +# sample pipeline with a retry failure strategy +# that aborts for enumerated error types. + +pipeline: + stages: + - steps: + - run: + script: go test + container: golang + on-failure: + errors: [ unknown, connectivity ] + action: abort diff --git a/approved/pipeline/pipeline.yaml b/approved/pipeline/pipeline.yaml new file mode 100644 index 0000000..a4c72bd --- /dev/null +++ b/approved/pipeline/pipeline.yaml @@ -0,0 +1,75 @@ +# sample pipeline with run step + +pipeline: + stages: + - steps: + - run: + script: go build + +--- + +# sample pipeline with run step, short syntax + +pipeline: + stages: + - steps: + - run: go build + +--- + +# sample pipeline with run step, shortest syntax + +pipeline: + stages: + - steps: + - go build + +--- + +# sample pipeline with conditional execution + +pipeline: + if: ${{ branch == "main" }} + stages: + - steps: + - run: + script: go build + +--- + +# sample pipeline with global envs + +pipeline: + env: + GOOS: linux + GOARCH: amd64 + stages: + - steps: + - go build + +--- + +# sample pipeline with optional repository override + +pipeline: + # repository should be optional. If undefined, + # the repository and conector are the same as + # where the yaml was stored. + repo: + name: drone/drone + connector: account.github + stages: + - steps: + - go build + +--- + +# sample pipeline, github compatible + +jobs: + test: + runs-on: ubuntu + steps: + - run: go build + +--- \ No newline at end of file diff --git a/approved/pipeline/stage.yaml b/approved/pipeline/stage.yaml new file mode 100644 index 0000000..1cca37a --- /dev/null +++ b/approved/pipeline/stage.yaml @@ -0,0 +1,155 @@ +# simple stage. + +pipeline: + stages: + - steps: + - run: + script: go build + +--- + +# simple stage, with id + +pipeline: + stages: + - id: build + steps: + - run: + script: go build + +--- + +# simple stage, with name + +pipeline: + stages: + - name: build + steps: + - run: + script: go build + +--- + +# simple stage, with conditions + +pipeline: + stages: + - if: ${{ branch == "main" }} + steps: + - run: + script: go build + + +--- + +# simple stage, pinned to delegate + +pipeline: + stages: + - delegate: some-delegate + steps: + - run: + script: go build + +--- + +# simple stage, with simple failure strategy + +pipeline: + stages: + - steps: + - run: + script: go build + on-failure: + errors: all + action: ignore + +--- + +# simple stage, with matrix strategy + +pipeline: + stages: + - steps: + - run: + script: go build + container: golang:${{ matrix.version }} + strategy: + matrix: + version: + - "1.19" + - "1.20" + +--- + +# simple stage, with cache intelligence settings + +pipeline: + stages: + - steps: + - run: + script: go build + cache: + path: /path/to/file + +--- + +# simple stage, with single service, single environment + +pipeline: + stages: + - steps: + - run: + script: go build + service: petstore + environment: prod + +--- + +# simple stage, with multi-service, multi-environment + +pipeline: + stages: + - steps: + - run: + script: go build + service: + items: + - petstore-frontend + - petstore-backend + environment: + parallel: true + items: + - name: prod + deploy-to: all + - name: stage + deploy-to: + - infra1 + - infra2 + - name: dev + deploy-to: infra3 + +--- + +# service and environment at the pipeline level, +# allows us to remove propagation configuration. + + +pipeline: + service: + items: + - petstore-frontend + - petstore-backend + environment: + parallel: true + items: + - name: prod + deploy-to: all + stages: + # override the service and environment + # at the stage level. + - service: petstore + environment: prod + steps: + - run: + script: go build diff --git a/approved/pipeline/step-group.yaml b/approved/pipeline/step-group.yaml new file mode 100644 index 0000000..1eb3f0e --- /dev/null +++ b/approved/pipeline/step-group.yaml @@ -0,0 +1,30 @@ +# simple group step. + +pipeline: + stages: + - steps: + - group: + steps: + - run: + container: golang + script: go build + - run: + container: golang + script: go test + +--- + +# simple group step with conditional + +pipeline: + stages: + - steps: + - if: ${{ branch == "main" }} + group: + steps: + - run: + container: golang + script: go build + - run: + container: golang + script: go test \ No newline at end of file diff --git a/approved/pipeline/step-parallel.yaml b/approved/pipeline/step-parallel.yaml new file mode 100644 index 0000000..850df38 --- /dev/null +++ b/approved/pipeline/step-parallel.yaml @@ -0,0 +1,30 @@ +# simple parallel step. + +pipeline: + stages: + - steps: + - parallel: + steps: + - run: + container: golang + script: go build + - run: + container: golang + script: go test + +--- + +# simple parallel step with conditional + +pipeline: + stages: + - steps: + - if: ${{ branch == "main" }} + parallel: + steps: + - run: + container: golang + script: go build + - run: + container: golang + script: go test diff --git a/approved/pipeline/step.yaml b/approved/pipeline/step.yaml new file mode 100644 index 0000000..8218190 --- /dev/null +++ b/approved/pipeline/step.yaml @@ -0,0 +1,52 @@ +# simple step. + +pipeline: + stages: + - steps: + - run: + script: go build + +--- + +# step with conditions + +pipeline: + stages: + - steps: + - if: ${{ branch == "main" }} + run: + script: go build + +--- + +# step with id + +pipeline: + stages: + - steps: + - id: build + run: + script: go build + +--- + +# step with name + +pipeline: + stages: + - steps: + - name: build + run: + script: go build + +--- + +# step with timeout (10 minutes) + +pipeline: + stages: + - steps: + - name: build + timeout: 10m + run: + script: go build diff --git a/samples/pipeline.yaml b/samples/pipeline.yaml index 208a7e8..c1bc759 100644 --- a/samples/pipeline.yaml +++ b/samples/pipeline.yaml @@ -74,18 +74,3 @@ jobs: --- -# sample github pipeline, with the extended -# harness sytnax. This pipeline includes a -# Harness template step, even though GitHub -# has zero concept of templates. - -jobs: - test: - runs-on: ubuntu - steps: - - run: go build - - template: - uses: account.docker - with: - repo: harness/hello-world - tags: latest From e8345b34fabf04890d2709ddd42e364df7787916 Mon Sep 17 00:00:00 2001 From: Rohan Gupta Date: Mon, 11 Mar 2024 20:16:53 -0700 Subject: [PATCH 02/11] helm rollback, kubernetes scale, terraform plan to be added --- approved/http.yaml | 3 +- samples/actions/helm-rollback.yaml | 5 ++ samples/actions/kubernetes-scale.yaml | 9 +++ samples/actions/terraform-plan.yaml | 101 ++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 samples/actions/helm-rollback.yaml create mode 100644 samples/actions/kubernetes-scale.yaml create mode 100644 samples/actions/terraform-plan.yaml diff --git a/approved/http.yaml b/approved/http.yaml index 5215eef..9592ad5 100644 --- a/approved/http.yaml +++ b/approved/http.yaml @@ -10,7 +10,8 @@ headers: x-api-key: <+secret.getValue("api_key")> content-type: "application/json" - assertion: "expression" + assertion: + code: 200 body: | identifier: "test" name: "test" diff --git a/samples/actions/helm-rollback.yaml b/samples/actions/helm-rollback.yaml new file mode 100644 index 0000000..3f99bff --- /dev/null +++ b/samples/actions/helm-rollback.yaml @@ -0,0 +1,5 @@ +- action: + uses: helm-rollback + with: + steady-state: false + timeout: 10m \ No newline at end of file diff --git a/samples/actions/kubernetes-scale.yaml b/samples/actions/kubernetes-scale.yaml new file mode 100644 index 0000000..ced91c7 --- /dev/null +++ b/samples/actions/kubernetes-scale.yaml @@ -0,0 +1,9 @@ +- action: + uses: kubernetes-scale + with: + workload: default/Deployment/harness-example + replica: 2 + percentage: 100 # optional (either replica or percentage) + steady-state-check: false # optional - default is false + + diff --git a/samples/actions/terraform-plan.yaml b/samples/actions/terraform-plan.yaml new file mode 100644 index 0000000..2a9f9dc --- /dev/null +++ b/samples/actions/terraform-plan.yaml @@ -0,0 +1,101 @@ +## Cloning the Repository +- action: + uses: git-clone + with: + branch: main + repo-name: Product-Management + connector: cd-demo + + +## Terraform Plan +- action: + uses: terraform-plan + with: + command: apply | destroy + aws-provider: account.aws_connector + workspace: dev + backendConfig: |- + terraform { + backend "gcs" { + bucket = "tf-state-prod" + prefix = "terraform/state" + } + } + secrets-manager: Harness Secrets Manager + env: + - TF_LOG_PATH: ./terraform.log + args: + - refresh: --args + export-plan: true + human-readable-plan: true + state-storage: false + skip-refresh: false + + + + + + +### Curent NG Step Design +# - step: +# type: TerraformPlan +# name: TerraformPlan_1 +# identifier: TerraformPlan_1 +# spec: +# provisionerIdentifier: dev +# configuration: +# command: Apply +# configFiles: +# store: +# spec: +# connectorRef: account.CDNGAuto_GithubRepoPipelinesNgAutomationiDYaC0PbFx +# folderPath: dev +# gitFetchType: Branch +# branch: prod +# type: Github +# providerCredential: +# type: Aws +# spec: +# connectorRef: <+input> +# region: <+input> +# roleArn: <+input> +# backendConfig: +# type: Inline +# spec: +# content: |- +# terraform { +# backend "gcs" { +# bucket = "tf-state-prod" +# prefix = "terraform/state" +# } +# } +# environmentVariables: +# - name: TF_LOG_PATH +# value: ./terraform.log +# type: String +# targets: +# - module.s3_bucket +# commandFlags: +# - commandType: WORKSPACE +# flag: <+input> +# varFiles: +# - varFile: +# type: Remote +# identifier: dev +# spec: +# store: +# type: Bitbucket +# spec: +# gitFetchType: Branch +# repoName: prod +# branch: proad +# paths: +# - /prod/tf.vars +# connectorRef: <+input> +# secretManagerRef: org.pl_hashicorp_withsecret_jSlq +# workspace: <+input> +# exportTerraformPlanJson: <+input> +# skipStateStorage: <+input> +# exportTerraformHumanReadablePlan: <+input> +# skipRefreshCommand: <+input> +# timeout: 10m \ No newline at end of file From 0c61ae01c6dd6e0571ee593f420400b933179e5b Mon Sep 17 00:00:00 2001 From: Rohan Gupta <52221549+thisrohangupta@users.noreply.github.com> Date: Mon, 11 Mar 2024 21:39:05 -0700 Subject: [PATCH 03/11] Create service.yaml --- approved/service.yaml | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 approved/service.yaml diff --git a/approved/service.yaml b/approved/service.yaml new file mode 100644 index 0000000..c4b43cc --- /dev/null +++ b/approved/service.yaml @@ -0,0 +1,50 @@ +version: 1 +kind: service +spec: + type: native-helm + spec: + manifests: + primary: <+input> + sources: + - type: HelmChart + id: manifest1 (id is mandatory) + spec: + type: Github | S3 | GCS + spec: + connector: liquibaselabrepoconn + repo: helm-charts ##### optional + location: refs/heads/main:/charts ##### following git notation + values: ##### optional + - /abc/xyz.yaml + skip_versioning: false ##### optional + declarative_rollback: false ##### optional + artifacts: + primary: <+inputs.abc> + sources: + - id: artifact1 + type: DockerRegistry + spec: + connector: curl + location: /abc/wsz:<+ variables.tag> ##### imagePath + tag field combined + - id: artifact1 + type: DockerRegistry + spec: + connector: curl + location: /abc/wsz:<+ variables.tag> + - id: artifact1 + sidecar: true ##### adding this sidecar tag instead of separate section + type: DockerRegistry + spec: + connector: curl + location: /abc/wsz:<+ variables.tag> + config_files: + - id: config-file1 ##### alternate we can have similar sources field here + type: Harness + id: config-file1 + spec: + files: + - /abc.yaml + variables: + tag (variable_name): + type: String + value: 1.9.0 From a99c9aee53e199a1e2285d14ca56d2f1e494dcb3 Mon Sep 17 00:00:00 2001 From: Rohan Gupta <52221549+thisrohangupta@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:57:45 -0700 Subject: [PATCH 04/11] Create service.yaml --- samples/service.yaml | 91 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 samples/service.yaml diff --git a/samples/service.yaml b/samples/service.yaml new file mode 100644 index 0000000..7bd0ff3 --- /dev/null +++ b/samples/service.yaml @@ -0,0 +1,91 @@ +service: + name: s11 + identifier: s11 + serviceDefinition: + type: Kubernetes + spec: + manifests: + - manifest: + identifier: aaa + type: Values + spec: + store: + type: Github + spec: + connectorRef: org.adi_org_github + gitFetchType: Branch + paths: + - aa + repoName: aa + branch: aa + - manifest: + identifier: aaaaa + type: K8sManifest + spec: + store: + type: Github + spec: + connectorRef: <+input> + gitFetchType: Commit + paths: + - aaaa + repoName: aaaa + commitId: aaaaa + skipResourceVersioning: false + enableDeclarativeRollback: false + artifacts: + primary: + primaryArtifactRef: <+input> + sources: + - spec: + connectorRef: account.asdsads + imagePath: aa + tag: <+input> + digest: aa + identifier: aa + type: DockerRegistry + - name: aaa + identifier: aaa + template: + templateRef: org.wxcartifactsource + versionLabel: v8 + templateInputs: + type: CustomArtifact + spec: + type: CustomArtifact + inputs: + - name: GITHUB_ORG + type: String + value: <+input>.default(CloudCalling) + - name: REPO_NAME + type: String + value: <+input> + - name: DEFAULT_BRANCH + type: String + value: <+input>.default(master) + version: <+input> + sidecars: + - sidecar: + spec: + connectorRef: account.asdsads + imagePath: aa + tag: <+input> + digest: aa + identifier: aa + type: DockerRegistry + configFiles: + - configFile: + identifier: aa + spec: + store: + type: Harness + spec: + files: + - /fileA + variables: + - name: aa + type: String + description: aaa + required: true + value: aa + gitOpsEnabled: false From 7368b17a2e475ec958e10a2890adfc3a68857c20 Mon Sep 17 00:00:00 2001 From: Rohan Gupta <52221549+thisrohangupta@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:58:57 -0700 Subject: [PATCH 05/11] Create environment.yaml --- samples/environment.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 samples/environment.yaml diff --git a/samples/environment.yaml b/samples/environment.yaml new file mode 100644 index 0000000..a4be43f --- /dev/null +++ b/samples/environment.yaml @@ -0,0 +1,7 @@ +environment: + name: envin + identifier: envin + tags: {} + type: Production + orgIdentifier: default + projectIdentifier: TcSvcOverrideTest From 0de729f0da05b275670863d47fcbd1bf66c17286 Mon Sep 17 00:00:00 2001 From: Rohan Gupta Date: Tue, 19 Mar 2024 15:54:32 -0700 Subject: [PATCH 06/11] serverless --- samples/actions/sam-build.yaml | 47 ++++++++++++++++++++++ samples/actions/serverless.yaml | 69 +++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 samples/actions/sam-build.yaml create mode 100644 samples/actions/serverless.yaml diff --git a/samples/actions/sam-build.yaml b/samples/actions/sam-build.yaml new file mode 100644 index 0000000..99139b8 --- /dev/null +++ b/samples/actions/sam-build.yaml @@ -0,0 +1,47 @@ +## Sam Build & Deploy + +## Cloning the Repository +- action: + uses: git-clone + with: + branch: main + repo-name: Product-Management + connector: cd-demo +--- + +## Download Manifest +- action: + uses: harness-download + +--- + +## SAM Build +- action: + uses: sam-build + with: + version: 2.0 ## Optional + command: "--use-container" ## Optional + build-container-registry: "ecr" ## Optional + image-pull-policy: always + user: 1000 + memory: 10mb + cpu: 0.25 + args: + - SAM_LOG: "true" + +--- + +## SAM Deploy +- action: + uses: sam-deploy + with: + version: 2.0 ## Optional + command: "--use-container" ## Optional + build-container-registry: "ecr" ## Optional + image-pull-policy: always + user: 1000 + memory: 10mb + cpu: 0.25 + args: + - SAM_LOG: "true" + diff --git a/samples/actions/serverless.yaml b/samples/actions/serverless.yaml new file mode 100644 index 0000000..d46117d --- /dev/null +++ b/samples/actions/serverless.yaml @@ -0,0 +1,69 @@ +## Cloning the Repository +- action: + uses: git-clone + with: + branch: main + repo-name: Product-Management + connector: cd-demo + +--- +## Download Manifest +- action: + uses: harness-download + +--- + +## Serverless Package +- action: + uses: serverless-package + with: + version: 2.0 ## Optional + command: "" ## Optional + image-pull-policy: always + user: 1000 + memory: 10mb + cpu: 0.25 + args: + - SERVERLESS_LOG: "true" + +--- +## Serverless Deploy +- action: + uses: serverless-deploy + with: + version: 2.0 ## Optional + command: "" ## Optional + image-pull-policy: always + user: 1000 + memory: 10mb + cpu: 0.25 + args: + - SERVERLESS_LOG: "true" + +--- + +## Serverless Prepare Rollback +- action: + uses: serverless-prepare-rollback + with: + version: 2.0 ## Optional + image-pull-policy: always + user: 1000 + memory: 10mb + cpu: 0.25 + args: + - SERVERLESS_LOG: "true" + +--- + +## Serverless Rollback +- action: + uses: serverless-rollback + with: + version: 2.0 ## Optional + image-pull-policy: always + user: 1000 + memory: 10mb + cpu: 0.25 + args: + - SERVERLESS_LOG: "true" \ No newline at end of file From 7e55ea13045298dbeef3fe8d0307d4ec7f8564f1 Mon Sep 17 00:00:00 2001 From: Rohan Gupta <52221549+thisrohangupta@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:39:44 -0700 Subject: [PATCH 07/11] Update environment.yaml --- samples/environment.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/environment.yaml b/samples/environment.yaml index a4be43f..67e603c 100644 --- a/samples/environment.yaml +++ b/samples/environment.yaml @@ -1,7 +1,7 @@ environment: name: envin - identifier: envin + id: envin tags: {} - type: Production - orgIdentifier: default - projectIdentifier: TcSvcOverrideTest + type: production + org: default + project: TcSvcOverrideTest From 8476861e36b969d69e17a8cb45566091f9cfe5d9 Mon Sep 17 00:00:00 2001 From: Rohan Gupta <52221549+thisrohangupta@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:54:24 -0700 Subject: [PATCH 08/11] Update serverless.yaml --- samples/actions/serverless.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/samples/actions/serverless.yaml b/samples/actions/serverless.yaml index d46117d..aaecd22 100644 --- a/samples/actions/serverless.yaml +++ b/samples/actions/serverless.yaml @@ -3,7 +3,7 @@ uses: git-clone with: branch: main - repo-name: Product-Management + repo: Product-Management connector: cd-demo --- @@ -17,7 +17,6 @@ - action: uses: serverless-package with: - version: 2.0 ## Optional command: "" ## Optional image-pull-policy: always user: 1000 @@ -31,7 +30,6 @@ - action: uses: serverless-deploy with: - version: 2.0 ## Optional command: "" ## Optional image-pull-policy: always user: 1000 @@ -46,7 +44,6 @@ - action: uses: serverless-prepare-rollback with: - version: 2.0 ## Optional image-pull-policy: always user: 1000 memory: 10mb @@ -60,10 +57,9 @@ - action: uses: serverless-rollback with: - version: 2.0 ## Optional image-pull-policy: always user: 1000 memory: 10mb cpu: 0.25 args: - - SERVERLESS_LOG: "true" \ No newline at end of file + - SERVERLESS_LOG: "true" From f2184c4f2bd55cecdf8270f162897897a8c32a78 Mon Sep 17 00:00:00 2001 From: Rohan Gupta <52221549+thisrohangupta@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:55:05 -0700 Subject: [PATCH 09/11] Update terraform-plan.yaml --- samples/actions/terraform-plan.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/actions/terraform-plan.yaml b/samples/actions/terraform-plan.yaml index 2a9f9dc..332c760 100644 --- a/samples/actions/terraform-plan.yaml +++ b/samples/actions/terraform-plan.yaml @@ -3,7 +3,7 @@ uses: git-clone with: branch: main - repo-name: Product-Management + repo: Product-Management connector: cd-demo @@ -14,7 +14,7 @@ command: apply | destroy aws-provider: account.aws_connector workspace: dev - backendConfig: |- + backend-config: |- terraform { backend "gcs" { bucket = "tf-state-prod" @@ -98,4 +98,4 @@ # skipStateStorage: <+input> # exportTerraformHumanReadablePlan: <+input> # skipRefreshCommand: <+input> -# timeout: 10m \ No newline at end of file +# timeout: 10m From 83cafabf354c91e19b24899afe8df26e7b4bfeec Mon Sep 17 00:00:00 2001 From: Rohan Gupta <52221549+thisrohangupta@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:56:58 -0700 Subject: [PATCH 10/11] Update sam-build.yaml --- samples/actions/sam-build.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/samples/actions/sam-build.yaml b/samples/actions/sam-build.yaml index 99139b8..79ce4db 100644 --- a/samples/actions/sam-build.yaml +++ b/samples/actions/sam-build.yaml @@ -5,7 +5,7 @@ uses: git-clone with: branch: main - repo-name: Product-Management + repo: Product-Management connector: cd-demo --- @@ -19,7 +19,6 @@ - action: uses: sam-build with: - version: 2.0 ## Optional command: "--use-container" ## Optional build-container-registry: "ecr" ## Optional image-pull-policy: always @@ -35,7 +34,6 @@ - action: uses: sam-deploy with: - version: 2.0 ## Optional command: "--use-container" ## Optional build-container-registry: "ecr" ## Optional image-pull-policy: always From 2e2a8557c6cac83ee19a0a127236a2cc71135fa9 Mon Sep 17 00:00:00 2001 From: Rohan Gupta <52221549+thisrohangupta@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:59:09 -0700 Subject: [PATCH 11/11] Update pipeline.yaml --- samples/pipeline.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/samples/pipeline.yaml b/samples/pipeline.yaml index c1bc759..208a7e8 100644 --- a/samples/pipeline.yaml +++ b/samples/pipeline.yaml @@ -74,3 +74,18 @@ jobs: --- +# sample github pipeline, with the extended +# harness sytnax. This pipeline includes a +# Harness template step, even though GitHub +# has zero concept of templates. + +jobs: + test: + runs-on: ubuntu + steps: + - run: go build + - template: + uses: account.docker + with: + repo: harness/hello-world + tags: latest