From e38ff72bde78df62fa1dfc491f2ddd4d4f53c33d Mon Sep 17 00:00:00 2001 From: Shaurya Kalia Date: Wed, 16 Nov 2022 12:03:43 +0530 Subject: [PATCH 1/4] Clone pipeline shaurya-testing-failing - Clone --- .../shauryatestingfailing_Clone_Clone.yaml | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 .harness/shauryatestingfailing_Clone_Clone.yaml diff --git a/.harness/shauryatestingfailing_Clone_Clone.yaml b/.harness/shauryatestingfailing_Clone_Clone.yaml new file mode 100644 index 00000000..60712687 --- /dev/null +++ b/.harness/shauryatestingfailing_Clone_Clone.yaml @@ -0,0 +1,154 @@ +--- +pipeline: + projectIdentifier: "shauryaTest" + orgIdentifier: "default" + tags: {} + stages: + - stage: + name: "build test and push " + identifier: "build_test_and_push" + type: "CI" + spec: + cloneCodebase: false + infrastructure: + type: "KubernetesDirect" + spec: + connectorRef: "k8stest" + namespace: "harness-delegate-ng" + automountServiceAccountToken: true + nodeSelector: {} + os: "Linux" + execution: + steps: + - step: + type: "Run" + name: "run unit tests" + identifier: "run_unit_tests" + spec: + connectorRef: "new_docker_test" + image: "golang:1.15" + shell: "Sh" + command: "go get gotest.tools/gotestsum\ngotestsum --format=standard-verbose\ + \ --junitfile unit-tests.xml\nCGO_ENABLED=0 GOOS=linux GOARCH=amd64\ + \ go build -a -tags netgo" + reports: + type: "JUnit" + spec: + paths: + - "*.xml" + - step: + type: "Run" + name: "run unit tests 2" + identifier: "run_unit_tests_2" + spec: + connectorRef: "new_docker_test" + image: "golang:1.15" + shell: "Sh" + command: "go get gotest.tools/gotestsum\ngotestsum --format=standard-verbose\ + \ --junitfile unit-tests.xml\nCGO_ENABLED=0 GOOS=linux GOARCH=amd64\ + \ go build -a -tags netgo" + reports: + type: "JUnit" + spec: + paths: + - "*.xml" + when: + stageStatus: "All" + failureStrategies: [] + - parallel: + - step: + name: "acr" + identifier: "acr" + template: + templateRef: "acr" + versionLabel: "1" + - step: + type: "BuildAndPushACR" + name: "acr 2" + identifier: "acr_2" + spec: + connectorRef: "account.testAzureConnector0Ma5pDuhvg" + repository: "rep2" + subscriptionId: "123" + tags: + - "tag 2" + - step: + type: "BuildAndPushACR" + name: "acrfrominput" + identifier: "acrfrominput" + spec: + connectorRef: "<+input>" + repository: "<+input>" + subscriptionId: "<+input>" + tags: + - "acrinput" + serviceDependencies: + - identifier: "sql" + name: "sql" + type: "Service" + description: "sql" + spec: + connectorRef: "test" + image: "mysql:5" + variables: [] + - stage: + name: "build test and push 2 " + identifier: "build_test_and_push_2" + description: "" + type: "CI" + spec: + cloneCodebase: true + infrastructure: + type: "KubernetesDirect" + spec: + connectorRef: "k8stest" + namespace: "harness-delegate-ng" + nodeSelector: {} + os: "Linux" + execution: + steps: + - step: + type: "Run" + name: "run unit tests" + identifier: "run_unit_tests" + spec: + connectorRef: "new_docker_test" + image: "golang:1.15" + shell: "Sh" + command: "go get gotest.tools/gotestsum\ngotestsum --format=standard-verbose\ + \ --junitfile unit-tests.xml\nCGO_ENABLED=0 GOOS=linux GOARCH=amd64\ + \ go build -a -tags netgo" + reports: + type: "JUnit" + spec: + paths: + - "*.xml" + - step: + type: "Run" + name: "run unit tests 2" + identifier: "run_unit_tests_2" + spec: + connectorRef: "new_docker_test" + image: "golang:1.15" + shell: "Sh" + command: "go get gotest.tools/gotestsum\ngotestsum --format=standard-verbose\ + \ --junitfile unit-tests.xml\nCGO_ENABLED=0 GOOS=linux GOARCH=amd64\ + \ go build -a -tags netgo" + reports: + type: "JUnit" + spec: + paths: + - "*.xml" + when: + stageStatus: "All" + failureStrategies: [] + when: + pipelineStatus: "All" + storeType: "INLINE" + properties: + ci: + codebase: + connectorRef: "githubtest" + build: "<+input>" + identifier: "shauryatestingfailing_Clone_Clone" + name: "shaurya-testing-failing - Clone - Clone" From 7cee543cde5a65f5b65f6d1495f61f7d91c08a63 Mon Sep 17 00:00:00 2001 From: Shaurya Kalia Date: Fri, 24 Mar 2023 04:27:05 +0530 Subject: [PATCH 2/4] Create pipeline remote --- .harness/remote.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .harness/remote.yaml diff --git a/.harness/remote.yaml b/.harness/remote.yaml new file mode 100644 index 00000000..0768cc02 --- /dev/null +++ b/.harness/remote.yaml @@ -0,0 +1,40 @@ +pipeline: + name: remote + identifier: remote + projectIdentifier: shauryaTest + orgIdentifier: default + tags: {} + properties: + ci: + codebase: + connectorRef: accountsk + repoName: goHelloWorldServer + build: <+input> + stages: + - stage: + name: build + identifier: build + description: "" + type: CI + spec: + cloneCodebase: true + infrastructure: + type: KubernetesDirect + spec: + connectorRef: k8stest + namespace: harness-delegate-ng + automountServiceAccountToken: true + nodeSelector: {} + os: Linux + execution: + steps: + - step: + type: Run + name: Run_1 + identifier: Run_1 + spec: + connectorRef: test + image: alpine + shell: Sh + command: echo node --version + description: echo From e93da8520e967f88ab95231dbe03f940b4db0afe Mon Sep 17 00:00:00 2001 From: Shaurya Kalia Date: Fri, 24 Mar 2023 04:27:24 +0530 Subject: [PATCH 3/4] Update pipeline remote --- .harness/remote.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/remote.yaml b/.harness/remote.yaml index 0768cc02..41237ec9 100644 --- a/.harness/remote.yaml +++ b/.harness/remote.yaml @@ -34,7 +34,7 @@ pipeline: identifier: Run_1 spec: connectorRef: test - image: alpine + image: <+input> shell: Sh command: echo node --version description: echo From 9b42c8b6cebd337e729fe0ac1467bf3f7df24e5a Mon Sep 17 00:00:00 2001 From: Shaurya Kalia Date: Fri, 24 Mar 2023 10:33:34 +0530 Subject: [PATCH 4/4] Create inputset input1 --- .harness/input1.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .harness/input1.yaml diff --git a/.harness/input1.yaml b/.harness/input1.yaml new file mode 100644 index 00000000..e625b8bb --- /dev/null +++ b/.harness/input1.yaml @@ -0,0 +1,26 @@ +inputSet: + name: input1 + identifier: input1 + orgIdentifier: default + projectIdentifier: shauryaTest + pipeline: + identifier: remote + properties: + ci: + codebase: + build: + type: branch + spec: + branch: main-patch + stages: + - stage: + identifier: build + type: CI + spec: + execution: + steps: + - step: + identifier: Run_1 + type: Run + spec: + image: alpine