From ad01e5386f00ce70b4b44b79d0a54c400308aa91 Mon Sep 17 00:00:00 2001 From: "nofar.bluestein@harness.io" Date: Wed, 28 Jul 2021 09:08:36 -0500 Subject: [PATCH 01/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index 0d9a343..d16592a 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -13,6 +13,15 @@ pipeline: cloneCodebase: true execution: steps: + - step: + type: Run + name: fail builds + identifier: fail_builds + spec: + connectorRef: account.nofar_dockerhub + image: alpine + command: adas sad asdf + privileged: false - step: type: Run name: Run Unit Tests From 7d89c70042e4bc3f5f0583f52cef0f01be1fa448 Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 5 Aug 2021 09:52:49 -0400 Subject: [PATCH 02/35] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 33401a3..f6e104f 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Test - + From 3b616f323acaea14e73a884e4d2c08baf0a1708c Mon Sep 17 00:00:00 2001 From: Harsh Jain Date: Mon, 9 Aug 2021 15:52:00 +0530 Subject: [PATCH 03/35] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6e104f..f85e411 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ $ ./go-sample-app ```bash $ curl http://localhost:8080?name=Nofar Hello, Nofar -Test +Test1 ``` From 8821f68d61a77678a870840dca19745abbc6d819 Mon Sep 17 00:00:00 2001 From: nofarb Date: Fri, 17 Sep 2021 12:13:11 -0500 Subject: [PATCH 04/35] Update test.txt --- test.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test.txt b/test.txt index bbe838c..595ea25 100644 --- a/test.txt +++ b/test.txt @@ -1,2 +1,3 @@ A s +asdasd From 06b689ac5b926180abd8836e958170009ebab72a Mon Sep 17 00:00:00 2001 From: Harness_user Date: Wed, 27 Oct 2021 16:46:17 -0500 Subject: [PATCH 05/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 52 ++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index d16592a..c10d1a7 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -13,15 +13,6 @@ pipeline: cloneCodebase: true execution: steps: - - step: - type: Run - name: fail builds - identifier: fail_builds - spec: - connectorRef: account.nofar_dockerhub - image: alpine - command: adas sad asdf - privileged: false - step: type: Run name: Run Unit Tests @@ -33,37 +24,40 @@ pipeline: set +e go get gotest.tools/gotestsum gotestsum --format=standard-verbose --junitfile unit-tests.xml - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo exit 0 + privileged: false reports: type: JUnit spec: paths: - "*.xml" - - parallel: - - step: - type: BuildAndPushDockerRegistry - name: Build and push image to DockerHub - identifier: Build_and_push_image_to_DockerHub - spec: - connectorRef: account.nofar_dockerhub - repo: bluebbb/godemo - tags: - - <+pipeline.sequenceId> - - step: - type: Run - name: show workspace content - identifier: show_workspace_content - spec: - connectorRef: account.nofar_dockerhub - image: alpine - command: ls + - step: + type: Run + name: Go Build + identifier: Go_Build + spec: + connectorRef: account.nofar_dockerhub + image: golang:1.15 + command: |- + set +e + go get gotest.tools/gotestsum + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo + exit 0 + privileged: false + - step: + type: BuildAndPushDockerRegistry + name: Build and push image to DockerHub + identifier: Build_and_push_image_to_DockerHub + spec: + connectorRef: account.nofar_dockerhub + repo: bluebbb/godemo + tags: + - <+pipeline.sequenceId> infrastructure: type: KubernetesDirect spec: connectorRef: account.k8scluster namespace: harness-delegate-pmdemo - serviceDependencies: [] sharedPaths: - "" variables: From 912384800fe5415d675528e7c9923a46d218850e Mon Sep 17 00:00:00 2001 From: Harness_user Date: Wed, 27 Oct 2021 16:52:11 -0500 Subject: [PATCH 06/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index c10d1a7..a9da3f2 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -52,7 +52,8 @@ pipeline: connectorRef: account.nofar_dockerhub repo: bluebbb/godemo tags: - - <+pipeline.sequenceId> + - latest + optimize: true infrastructure: type: KubernetesDirect spec: From 84c8a911011cb2c09bbd668fd2d9e31c7350115b Mon Sep 17 00:00:00 2001 From: Harness_user Date: Tue, 2 Nov 2021 13:04:20 -0500 Subject: [PATCH 07/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index a9da3f2..1e279a3 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -44,6 +44,10 @@ pipeline: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo exit 0 privileged: false + when: + stageStatus: Success + condition: <+codebase.build.type> == "Tag" && <+codebase.tag> == "v" + failureStrategies: [] - step: type: BuildAndPushDockerRegistry name: Build and push image to DockerHub From e4301516ce29d068e062833cca0283e5bba10907 Mon Sep 17 00:00:00 2001 From: Harness_user Date: Tue, 2 Nov 2021 13:16:04 -0500 Subject: [PATCH 08/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index 1e279a3..e61ebd5 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -13,6 +13,15 @@ pipeline: cloneCodebase: true execution: steps: + - step: + type: Run + name: echo + identifier: echo + spec: + connectorRef: account.nofar_dockerhub + image: alpine + command: echo <+codebase.build.type> + privileged: false - step: type: Run name: Run Unit Tests @@ -31,6 +40,10 @@ pipeline: spec: paths: - "*.xml" + when: + stageStatus: Success + condition: <+codebase.build.type> == "Tag" + failureStrategies: [] - step: type: Run name: Go Build @@ -46,7 +59,6 @@ pipeline: privileged: false when: stageStatus: Success - condition: <+codebase.build.type> == "Tag" && <+codebase.tag> == "v" failureStrategies: [] - step: type: BuildAndPushDockerRegistry From 8233e35ae3529db36567e7f59adaf4cb5a329c99 Mon Sep 17 00:00:00 2001 From: Harness_user Date: Tue, 2 Nov 2021 13:18:23 -0500 Subject: [PATCH 09/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index e61ebd5..ad9bad9 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -20,7 +20,7 @@ pipeline: spec: connectorRef: account.nofar_dockerhub image: alpine - command: echo <+codebase.build.type> + command: echo <+codebase.tag> privileged: false - step: type: Run From 7b134576f6f1e962929a4540d7376e08a927b53b Mon Sep 17 00:00:00 2001 From: Harness_user Date: Tue, 2 Nov 2021 21:40:25 -0500 Subject: [PATCH 10/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index ad9bad9..a5ed58c 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -20,7 +20,7 @@ pipeline: spec: connectorRef: account.nofar_dockerhub image: alpine - command: echo <+codebase.tag> + command: echo <+codebase.commitSha> privileged: false - step: type: Run From 4aa648ade484796a772cf9be3461cc561b3ead12 Mon Sep 17 00:00:00 2001 From: Harness_user Date: Thu, 4 Nov 2021 14:52:32 -0500 Subject: [PATCH 11/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index a5ed58c..796e64d 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -42,7 +42,7 @@ pipeline: - "*.xml" when: stageStatus: Success - condition: <+codebase.build.type> == "Tag" + condition: <+codebase.build.type> == "Tag" && <+codebase.tag> == "nonexistingtag" failureStrategies: [] - step: type: Run From 4c0c7a9e039ab7d3025db21527b5321eec74906f Mon Sep 17 00:00:00 2001 From: Harness_user Date: Fri, 5 Nov 2021 11:14:47 -0500 Subject: [PATCH 12/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index 796e64d..1b1d66e 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -42,7 +42,13 @@ pipeline: - "*.xml" when: stageStatus: Success - condition: <+codebase.build.type> == "Tag" && <+codebase.tag> == "nonexistingtag" + condition: |- + if (<+codebase.build.type> == "Tag") { + + If (<+codebase.tag> == "nonexistingtag”) + { return true} + + } failureStrategies: [] - step: type: Run From 6f3e2c07bc779e1a2c8967db4be4f9e8a578cf78 Mon Sep 17 00:00:00 2001 From: Harness_user Date: Fri, 5 Nov 2021 11:16:02 -0500 Subject: [PATCH 13/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index 1b1d66e..a2b4005 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -46,7 +46,7 @@ pipeline: if (<+codebase.build.type> == "Tag") { If (<+codebase.tag> == "nonexistingtag”) - { return true} + { return true;} } failureStrategies: [] From 9f501f637ef9b8ae3d74a54364b94d0902203e34 Mon Sep 17 00:00:00 2001 From: Harness_user Date: Fri, 5 Nov 2021 11:18:13 -0500 Subject: [PATCH 14/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index a2b4005..d13396b 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -45,8 +45,7 @@ pipeline: condition: |- if (<+codebase.build.type> == "Tag") { - If (<+codebase.tag> == "nonexistingtag”) - { return true;} + return true; } failureStrategies: [] From ca9dd2de7727c5a1b988fecd1a3ce4a631bad321 Mon Sep 17 00:00:00 2001 From: Harness_user Date: Fri, 19 Nov 2021 09:24:36 -0600 Subject: [PATCH 15/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index d13396b..46f662e 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -13,15 +13,6 @@ pipeline: cloneCodebase: true execution: steps: - - step: - type: Run - name: echo - identifier: echo - spec: - connectorRef: account.nofar_dockerhub - image: alpine - command: echo <+codebase.commitSha> - privileged: false - step: type: Run name: Run Unit Tests @@ -42,12 +33,6 @@ pipeline: - "*.xml" when: stageStatus: Success - condition: |- - if (<+codebase.build.type> == "Tag") { - - return true; - - } failureStrategies: [] - step: type: Run @@ -65,6 +50,15 @@ pipeline: when: stageStatus: Success failureStrategies: [] + - step: + type: Run + name: print content + identifier: print_content + spec: + connectorRef: account.nofar_dockerhub + image: alpine + command: ls -a + privileged: false - step: type: BuildAndPushDockerRegistry name: Build and push image to DockerHub From 0c0e51edd5b2645e0a4309f911f7d80e3d2a0828 Mon Sep 17 00:00:00 2001 From: nofarb Date: Tue, 22 Feb 2022 16:30:09 -0600 Subject: [PATCH 16/35] Create pipeline Go Demo_111_delete --- config/.harness/Go_Demo_111.yaml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 config/.harness/Go_Demo_111.yaml diff --git a/config/.harness/Go_Demo_111.yaml b/config/.harness/Go_Demo_111.yaml new file mode 100644 index 0000000..66f244f --- /dev/null +++ b/config/.harness/Go_Demo_111.yaml @@ -0,0 +1,42 @@ +pipeline: + name: Go Demo_111_delete + identifier: Go_Demo_111 + projectIdentifier: Product_Demos_CIE + orgIdentifier: default + tags: {} + stages: + - stage: + name: Build Test and Push + identifier: Test_Build_and_Push + type: CI + spec: + cloneCodebase: true + execution: + steps: + - step: + type: Run + name: print content + identifier: print_content + spec: + connectorRef: account.nofar_dockerhub + image: alpine + command: echo <+codebase.branch> + privileged: false + infrastructure: + type: KubernetesDirect + spec: + connectorRef: account.k8scluster + namespace: harness-delegate-pmdemo + variables: + - name: myStageVar + type: String + value: stageVarValue + properties: + ci: + codebase: + connectorRef: account.goHelloWorldServer_repo + build: <+input> + variables: + - name: pipelineVar + type: String + value: pipelineVarValue From 9fda13d2cc75b3a8373f2b83cdb4cd20ad505b3d Mon Sep 17 00:00:00 2001 From: nofarb Date: Tue, 22 Feb 2022 16:32:57 -0600 Subject: [PATCH 17/35] Update Go_Demo_111.yaml --- config/.harness/Go_Demo_111.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/.harness/Go_Demo_111.yaml b/config/.harness/Go_Demo_111.yaml index 66f244f..def12d2 100644 --- a/config/.harness/Go_Demo_111.yaml +++ b/config/.harness/Go_Demo_111.yaml @@ -20,7 +20,7 @@ pipeline: spec: connectorRef: account.nofar_dockerhub image: alpine - command: echo <+codebase.branch> + command: echo "main" privileged: false infrastructure: type: KubernetesDirect From 8e87e7c4452bae7e266839412dbb95c7b0296fa6 Mon Sep 17 00:00:00 2001 From: nofarb Date: Tue, 22 Feb 2022 16:35:04 -0600 Subject: [PATCH 18/35] Update Go_Demo_111.yaml --- config/.harness/Go_Demo_111.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/.harness/Go_Demo_111.yaml b/config/.harness/Go_Demo_111.yaml index def12d2..179bdf4 100644 --- a/config/.harness/Go_Demo_111.yaml +++ b/config/.harness/Go_Demo_111.yaml @@ -15,7 +15,7 @@ pipeline: steps: - step: type: Run - name: print content + name: print content 233 identifier: print_content spec: connectorRef: account.nofar_dockerhub From 498a0e0e1053c077692b12f29ef8a3bbb8ff8854 Mon Sep 17 00:00:00 2001 From: nofarb Date: Wed, 9 Nov 2022 11:47:44 -0600 Subject: [PATCH 19/35] Delete test.txt --- test.txt | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 test.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index 595ea25..0000000 --- a/test.txt +++ /dev/null @@ -1,3 +0,0 @@ -A -s -asdasd From 06e01b474f8265cb127a88a155e79d217f3055fb Mon Sep 17 00:00:00 2001 From: nofarb Date: Wed, 9 Nov 2022 11:47:59 -0600 Subject: [PATCH 20/35] Delete config directory --- config/.harness/Go_Demo.yaml | 131 ------------------------------- config/.harness/Go_Demo_111.yaml | 42 ---------- config/.harness/nofar_demo.yaml | 26 ------ 3 files changed, 199 deletions(-) delete mode 100644 config/.harness/Go_Demo.yaml delete mode 100644 config/.harness/Go_Demo_111.yaml delete mode 100644 config/.harness/nofar_demo.yaml diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml deleted file mode 100644 index 46f662e..0000000 --- a/config/.harness/Go_Demo.yaml +++ /dev/null @@ -1,131 +0,0 @@ -pipeline: - name: Go Demo - identifier: Go_Demo - projectIdentifier: Product_Demos_CIE - orgIdentifier: default - tags: {} - stages: - - stage: - name: Build Test and Push - identifier: Test_Build_and_Push - type: CI - spec: - cloneCodebase: true - execution: - steps: - - step: - type: Run - name: Run Unit Tests - identifier: Run_Unit_Tests - spec: - connectorRef: account.nofar_dockerhub - image: golang:1.15 - command: |- - set +e - go get gotest.tools/gotestsum - gotestsum --format=standard-verbose --junitfile unit-tests.xml - exit 0 - privileged: false - reports: - type: JUnit - spec: - paths: - - "*.xml" - when: - stageStatus: Success - failureStrategies: [] - - step: - type: Run - name: Go Build - identifier: Go_Build - spec: - connectorRef: account.nofar_dockerhub - image: golang:1.15 - command: |- - set +e - go get gotest.tools/gotestsum - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo - exit 0 - privileged: false - when: - stageStatus: Success - failureStrategies: [] - - step: - type: Run - name: print content - identifier: print_content - spec: - connectorRef: account.nofar_dockerhub - image: alpine - command: ls -a - privileged: false - - step: - type: BuildAndPushDockerRegistry - name: Build and push image to DockerHub - identifier: Build_and_push_image_to_DockerHub - spec: - connectorRef: account.nofar_dockerhub - repo: bluebbb/godemo - tags: - - latest - optimize: true - infrastructure: - type: KubernetesDirect - spec: - connectorRef: account.k8scluster - namespace: harness-delegate-pmdemo - sharedPaths: - - "" - variables: - - name: myStageVar - type: String - value: stageVarValue - - stage: - name: Run Integration Test - identifier: Run_Integration_Test - type: CI - spec: - cloneCodebase: false - execution: - steps: - - step: - type: Run - name: test connection to server - identifier: test_connection_to_server - spec: - connectorRef: account.nofar_dockerhub - image: curlimages/curl:7.69.1 - command: |- - sleep 5 - curl localhost:8080 - privileged: false - - step: - type: Run - name: echo - identifier: echo - spec: - connectorRef: account.nofar_dockerhub - image: alpine - command: echo "hello" - privileged: false - serviceDependencies: - - identifier: runhelloworldserver - name: Run Hello World Server - type: Service - spec: - connectorRef: account.nofar_dockerhub - image: bluebbb/godemo:<+pipeline.sequenceId> - infrastructure: - useFromStage: Test_Build_and_Push - sharedPaths: - - "" - description: running integ tests - properties: - ci: - codebase: - connectorRef: account.goHelloWorldServer_repo - build: <+input> - variables: - - name: pipelineVar - type: String - value: pipelineVarValue diff --git a/config/.harness/Go_Demo_111.yaml b/config/.harness/Go_Demo_111.yaml deleted file mode 100644 index 179bdf4..0000000 --- a/config/.harness/Go_Demo_111.yaml +++ /dev/null @@ -1,42 +0,0 @@ -pipeline: - name: Go Demo_111_delete - identifier: Go_Demo_111 - projectIdentifier: Product_Demos_CIE - orgIdentifier: default - tags: {} - stages: - - stage: - name: Build Test and Push - identifier: Test_Build_and_Push - type: CI - spec: - cloneCodebase: true - execution: - steps: - - step: - type: Run - name: print content 233 - identifier: print_content - spec: - connectorRef: account.nofar_dockerhub - image: alpine - command: echo "main" - privileged: false - infrastructure: - type: KubernetesDirect - spec: - connectorRef: account.k8scluster - namespace: harness-delegate-pmdemo - variables: - - name: myStageVar - type: String - value: stageVarValue - properties: - ci: - codebase: - connectorRef: account.goHelloWorldServer_repo - build: <+input> - variables: - - name: pipelineVar - type: String - value: pipelineVarValue diff --git a/config/.harness/nofar_demo.yaml b/config/.harness/nofar_demo.yaml deleted file mode 100644 index 08aee95..0000000 --- a/config/.harness/nofar_demo.yaml +++ /dev/null @@ -1,26 +0,0 @@ -inputSet: - identifier: "nofar_demo" - name: "nofar_demo" - orgIdentifier: "default" - projectIdentifier: "Product_Demos_CIE" - pipeline: - identifier: "Go_Demo" - stages: - - stage: - identifier: "Run_Integration_Test" - type: "CI" - spec: - execution: - steps: - - step: - identifier: "test_connection_to_server" - type: "Run" - spec: - image: "curlimages/curl:7.69.1" - properties: - ci: - codebase: - build: - type: "branch" - spec: - branch: "main" From 1ebf66949a708e4d50c34a7e214bce59e58483e8 Mon Sep 17 00:00:00 2001 From: nofarb Date: Wed, 9 Nov 2022 11:48:12 -0600 Subject: [PATCH 21/35] Delete config_123 directory --- config_123/.harness/go_pipeline.yaml | 31 ---------------------------- config_123/.harness/pipeline345.yaml | 31 ---------------------------- 2 files changed, 62 deletions(-) delete mode 100644 config_123/.harness/go_pipeline.yaml delete mode 100644 config_123/.harness/pipeline345.yaml diff --git a/config_123/.harness/go_pipeline.yaml b/config_123/.harness/go_pipeline.yaml deleted file mode 100644 index fe54dbb..0000000 --- a/config_123/.harness/go_pipeline.yaml +++ /dev/null @@ -1,31 +0,0 @@ -pipeline: - name: go pipeline - identifier: go_pipeline - projectIdentifier: Demo_slkdflkdjf - orgIdentifier: default - tags: {} - stages: - - stage: - name: s1 - identifier: s1 - description: "" - type: CI - spec: - cloneCodebase: false - execution: - steps: - - step: - type: Run - name: echo - identifier: echo - spec: - connectorRef: account.nofar_dockerhub - image: alpine - command: echo "hello" - privileged: false - serviceDependencies: [] - infrastructure: - type: KubernetesDirect - spec: - connectorRef: account.k8scluster - namespace: aaaa diff --git a/config_123/.harness/pipeline345.yaml b/config_123/.harness/pipeline345.yaml deleted file mode 100644 index 61287bd..0000000 --- a/config_123/.harness/pipeline345.yaml +++ /dev/null @@ -1,31 +0,0 @@ -pipeline: - name: go pipeline - identifier: go_pipeline234 - projectIdentifier: Demo_slkdflkdjf - orgIdentifier: default - tags: {} - stages: - - stage: - name: s1 - identifier: s1 - description: "" - type: CI - spec: - cloneCodebase: false - execution: - steps: - - step: - type: Run - name: echo - identifier: echo - spec: - connectorRef: account.nofar_dockerhub - image: alpine - command: echo "hello" - privileged: false - serviceDependencies: [] - infrastructure: - type: KubernetesDirect - spec: - connectorRef: account.k8scluster - namespace: aaaa From 1c476919adceb604e6e9fe7963b2b53e4f166759 Mon Sep 17 00:00:00 2001 From: nofarb Date: Wed, 9 Nov 2022 11:48:35 -0600 Subject: [PATCH 22/35] Delete subfolder directory --- subfolder/.harness/is1.yaml | 19 ------------------- subfolder/.harness/test2.yaml | 31 ------------------------------- 2 files changed, 50 deletions(-) delete mode 100644 subfolder/.harness/is1.yaml delete mode 100644 subfolder/.harness/test2.yaml diff --git a/subfolder/.harness/is1.yaml b/subfolder/.harness/is1.yaml deleted file mode 100644 index ee7847b..0000000 --- a/subfolder/.harness/is1.yaml +++ /dev/null @@ -1,19 +0,0 @@ -inputSet: - identifier: "is1" - name: "is1" - orgIdentifier: "Archit" - projectIdentifier: "nofar_git_exp3" - pipeline: - identifier: "test2" - stages: - - stage: - identifier: "stage1" - type: "CI" - spec: - execution: - steps: - - step: - identifier: "test" - type: "Run" - spec: - image: "alpine" diff --git a/subfolder/.harness/test2.yaml b/subfolder/.harness/test2.yaml deleted file mode 100644 index 0aa841a..0000000 --- a/subfolder/.harness/test2.yaml +++ /dev/null @@ -1,31 +0,0 @@ -pipeline: - name: test2 - identifier: test2 - projectIdentifier: nofar_git_exp3 - orgIdentifier: Archit - tags: {} - stages: - - stage: - name: stage1 - identifier: stage1 - description: "" - type: CI - spec: - cloneCodebase: false - execution: - steps: - - step: - type: Run - name: test - identifier: test - spec: - connectorRef: harnessImage - image: <+input> - command: echo 'hello moo' - privileged: false - serviceDependencies: [] - infrastructure: - type: KubernetesDirect - spec: - connectorRef: account.trtrtr - namespace: whatever From 9dcfcdd7ee99b3ffaf3581b5a6d362462ab809c7 Mon Sep 17 00:00:00 2001 From: nofarb Date: Wed, 9 Nov 2022 11:48:45 -0600 Subject: [PATCH 23/35] Delete .harness directory --- .harness/mypipeline.yaml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .harness/mypipeline.yaml diff --git a/.harness/mypipeline.yaml b/.harness/mypipeline.yaml deleted file mode 100644 index 0e30c1a..0000000 --- a/.harness/mypipeline.yaml +++ /dev/null @@ -1 +0,0 @@ -some yaml From 0ef41fc0858c880d6a2e878459b66779fc44832e Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 10 Nov 2022 08:48:09 -0600 Subject: [PATCH 24/35] Update hello_server_test.go --- hello_server_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello_server_test.go b/hello_server_test.go index 2797605..ca22975 100644 --- a/hello_server_test.go +++ b/hello_server_test.go @@ -19,7 +19,7 @@ func TestGreetingSpecificDemo(t *testing.T) { func TestShowFailure(t *testing.T) { greeting := CreateGreeting("Demo1") if greeting != "Hello, Demo\n" { - t.Errorf("Intentional failure. got: %s, want: %s.", greeting, "Hello, Demo\n") + t.Errorf("Intentional failure. got: %s, want: %s.", greeting, "Hello, Demo1\n") } } From f2d362ba6a3ad351e0b700e9fd4d8a28aa8635cf Mon Sep 17 00:00:00 2001 From: nofarb Date: Thu, 10 Nov 2022 08:50:10 -0600 Subject: [PATCH 25/35] Update hello_server_test.go --- hello_server_test.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/hello_server_test.go b/hello_server_test.go index ca22975..f8caa02 100644 --- a/hello_server_test.go +++ b/hello_server_test.go @@ -16,21 +16,7 @@ func TestGreetingSpecificDemo(t *testing.T) { } } -func TestShowFailure(t *testing.T) { - greeting := CreateGreeting("Demo1") - if greeting != "Hello, Demo\n" { - t.Errorf("Intentional failure. got: %s, want: %s.", greeting, "Hello, Demo1\n") - } -} -func TestGreetingDefault(t *testing.T) { - greeting := CreateGreeting("") - if greeting != "Hello, Guest\n" { - t.Errorf("Greeting was incorrect, got: %s, want: %s.", greeting, "Hello, Guest\n") - } -} - - From fa30e4c819f0a9cc91370ed5f1d11a7842a66c10 Mon Sep 17 00:00:00 2001 From: nofarb Date: Mon, 14 Nov 2022 18:20:19 -0600 Subject: [PATCH 26/35] Create go.yml --- .github/workflows/go.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..68466b1 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,19 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + From 7c7d61d7e6ab25c74d2dc262148dc328acd9c89e Mon Sep 17 00:00:00 2001 From: nofarb Date: Fri, 9 Dec 2022 08:53:14 -0600 Subject: [PATCH 27/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 132 +++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 config/.harness/Go_Demo.yaml diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml new file mode 100644 index 0000000..1f2e224 --- /dev/null +++ b/config/.harness/Go_Demo.yaml @@ -0,0 +1,132 @@ +pipeline: + name: Go Demo + identifier: Go_Demo + projectIdentifier: Product_Demos_CIE + orgIdentifier: default + tags: {} + stages: + - stage: + name: Build Test and Push + identifier: Test_Build_and_Push + type: CI + spec: + cloneCodebase: true + execution: + steps: + - step: + type: Run + name: Run Unit Tests + identifier: Run_Unit_Tests + spec: + connectorRef: account.nofar_dockerhub + image: golang:1.15 + command: |- + set +e + go get gotest.tools/gotestsum + gotestsum --format=standard-verbose --junitfile unit-tests.xml + exit 0 + privileged: false + reports: + type: JUnit + spec: + paths: + - "*.xml" + when: + stageStatus: Success + failureStrategies: [] + - step: + type: Run + name: Go Build + identifier: Go_Build + spec: + connectorRef: account.nofar_dockerhub + image: golang:1.15 + command: |- + set +e + go get gotest.tools/gotestsum + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo + exit 0 + privileged: false + when: + stageStatus: Success + failureStrategies: [] + - step: + type: Run + name: print content + identifier: print_content + spec: + connectorRef: account.nofar_dockerhub + image: alpine + command: ls -a + privileged: false + - step: + type: BuildAndPushDockerRegistry + name: Build and push image to DockerHub + identifier: Build_and_push_image_to_DockerHub + spec: + connectorRef: account.nofar_dockerhub + repo: bluebbb/godemo + tags: + - latest + optimize: true + sharedPaths: + - "" + platform: + os: Linux + arch: Amd64 + runtime: + type: Cloud + spec: {} + variables: + - name: myStageVar + type: String + value: stageVarValue + - stage: + name: Run Integration Test + identifier: Run_Integration_Test + type: CI + spec: + cloneCodebase: false + execution: + steps: + - step: + type: Run + name: test connection to server + identifier: test_connection_to_server + spec: + connectorRef: account.nofar_dockerhub + image: curlimages/curl:7.69.1 + command: |- + sleep 5 + curl localhost:8080 + privileged: false + - step: + type: Run + name: echo + identifier: echo + spec: + connectorRef: account.nofar_dockerhub + image: alpine + command: echo "hello" + privileged: false + serviceDependencies: + - identifier: runhelloworldserver + name: Run Hello World Server + type: Service + spec: + connectorRef: account.nofar_dockerhub + image: bluebbb/godemo:<+pipeline.sequenceId> + infrastructure: + useFromStage: Test_Build_and_Push + sharedPaths: + - "" + description: running integ tests + properties: + ci: + codebase: + connectorRef: account.goHelloWorldServer_repo + build: <+input> + variables: + - name: pipelineVar + type: String + value: pipelineVarValue From ff62d5875fc1ea4910a7a9208f489cc3add7fc4a Mon Sep 17 00:00:00 2001 From: nofarb Date: Fri, 9 Dec 2022 08:54:34 -0600 Subject: [PATCH 28/35] Update pipeline Go Demo --- config/.harness/Go_Demo.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/.harness/Go_Demo.yaml b/config/.harness/Go_Demo.yaml index 1f2e224..8e2f748 100644 --- a/config/.harness/Go_Demo.yaml +++ b/config/.harness/Go_Demo.yaml @@ -124,7 +124,8 @@ pipeline: properties: ci: codebase: - connectorRef: account.goHelloWorldServer_repo + connectorRef: BS1223 + repoName: goHelloWorldServer build: <+input> variables: - name: pipelineVar From 80130ad76c17468c31d8abd79edbd74f9d93b640 Mon Sep 17 00:00:00 2001 From: shashanksandbox <143501888+shashanksandbox@users.noreply.github.com> Date: Wed, 30 Aug 2023 12:33:17 +0530 Subject: [PATCH 29/35] Update hello_server.go Test --- hello_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello_server.go b/hello_server.go index df038fd..d70fd28 100644 --- a/hello_server.go +++ b/hello_server.go @@ -23,7 +23,7 @@ func CreateGreeting(name string) string { if name == "" { name = "Guest" } - return "Hello, " + name + "\n" + return "Helloo, " + name + "\n" } func main() { From 485684a212783ced3cb55b207dcdb403b0ee1fb9 Mon Sep 17 00:00:00 2001 From: shashanksandbox <143501888+shashanksandbox@users.noreply.github.com> Date: Wed, 30 Aug 2023 12:37:36 +0530 Subject: [PATCH 30/35] Update hello_server.go Test1 --- hello_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello_server.go b/hello_server.go index d70fd28..839de6d 100644 --- a/hello_server.go +++ b/hello_server.go @@ -23,7 +23,7 @@ func CreateGreeting(name string) string { if name == "" { name = "Guest" } - return "Helloo, " + name + "\n" + return "Hellooo, " + name + "\n" } func main() { From a8ef1fd9c2c0a2e545319cc23c83f8f6ab4ca5ef Mon Sep 17 00:00:00 2001 From: shashanksandbox <143501888+shashanksandbox@users.noreply.github.com> Date: Wed, 30 Aug 2023 12:42:27 +0530 Subject: [PATCH 31/35] Update hello_server.go my test branch --- hello_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello_server.go b/hello_server.go index 839de6d..1cad5ca 100644 --- a/hello_server.go +++ b/hello_server.go @@ -23,7 +23,7 @@ func CreateGreeting(name string) string { if name == "" { name = "Guest" } - return "Hellooo, " + name + "\n" + return "Helloooo, " + name + "\n" } func main() { From 79334cf8f0142335a498e96d86bba92230a25bac Mon Sep 17 00:00:00 2001 From: shashanksandbox <143501888+shashanksandbox@users.noreply.github.com> Date: Wed, 30 Aug 2023 13:28:14 +0530 Subject: [PATCH 32/35] Update hello_server.go test123456 --- hello_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello_server.go b/hello_server.go index 1cad5ca..1ed1944 100644 --- a/hello_server.go +++ b/hello_server.go @@ -23,7 +23,7 @@ func CreateGreeting(name string) string { if name == "" { name = "Guest" } - return "Helloooo, " + name + "\n" + return "Hellooooo, " + name + "\n" } func main() { From 34cb5fbf6bb0bf6d0081e2aff839fd9df3a3ba44 Mon Sep 17 00:00:00 2001 From: shashanksandbox <143501888+shashanksandbox@users.noreply.github.com> Date: Wed, 30 Aug 2023 13:33:56 +0530 Subject: [PATCH 33/35] Update hello_server.go Change in Test branch --- hello_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello_server.go b/hello_server.go index 1ed1944..2d97cd6 100644 --- a/hello_server.go +++ b/hello_server.go @@ -23,7 +23,7 @@ func CreateGreeting(name string) string { if name == "" { name = "Guest" } - return "Hellooooo, " + name + "\n" + return "Hellooooo1, " + name + "\n" } func main() { From e5dc6ffff538c9b9d1f6bad476888c4fedf8e779 Mon Sep 17 00:00:00 2001 From: shashanksandbox <143501888+shashanksandbox@users.noreply.github.com> Date: Wed, 30 Aug 2023 13:42:44 +0530 Subject: [PATCH 34/35] Update hello_server.go abc --- hello_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello_server.go b/hello_server.go index 2d97cd6..6e0be6b 100644 --- a/hello_server.go +++ b/hello_server.go @@ -23,7 +23,7 @@ func CreateGreeting(name string) string { if name == "" { name = "Guest" } - return "Hellooooo1, " + name + "\n" + return "Hellooooo11, " + name + "\n" } func main() { From 568c2fe186cba1164252909eea5d7b9c5d9fbb68 Mon Sep 17 00:00:00 2001 From: shashanksandbox <143501888+shashanksandbox@users.noreply.github.com> Date: Wed, 30 Aug 2023 13:46:40 +0530 Subject: [PATCH 35/35] Update hello_server.go test --- hello_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello_server.go b/hello_server.go index 6e0be6b..573ff89 100644 --- a/hello_server.go +++ b/hello_server.go @@ -23,7 +23,7 @@ func CreateGreeting(name string) string { if name == "" { name = "Guest" } - return "Hellooooo11, " + name + "\n" + return "Hellooooo111, " + name + "\n" } func main() {