Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ad01e53
Update pipeline Go Demo
nofarblue Jul 28, 2021
024d7d8
Merge pull request #30 from keen-software/testbranch
harshjain12 Aug 5, 2021
7d89c70
Update README.md
nofarb Aug 5, 2021
3b616f3
Update README.md
harshjain12 Aug 9, 2021
a50127e
Merge pull request #31 from keen-software/test1-1
harshjain12 Aug 9, 2021
8821f68
Update test.txt
nofarb Sep 17, 2021
566bc57
Merge pull request #28 from keen-software/failMyBuild
nofarb Oct 8, 2021
06b689a
Update pipeline Go Demo
Oct 27, 2021
9123848
Update pipeline Go Demo
Oct 27, 2021
84c8a91
Update pipeline Go Demo
Nov 2, 2021
e430151
Update pipeline Go Demo
Nov 2, 2021
8233e35
Update pipeline Go Demo
Nov 2, 2021
7b13457
Update pipeline Go Demo
Nov 3, 2021
4aa648a
Update pipeline Go Demo
Nov 4, 2021
4c0c7a9
Update pipeline Go Demo
Nov 5, 2021
6f3e2c0
Update pipeline Go Demo
Nov 5, 2021
9f501f6
Update pipeline Go Demo
Nov 5, 2021
ca9dd2d
Update pipeline Go Demo
Nov 19, 2021
0c0e51e
Create pipeline Go Demo_111_delete
nofarblue Feb 22, 2022
9fda13d
Update Go_Demo_111.yaml
nofarb Feb 22, 2022
8e87e7c
Update Go_Demo_111.yaml
nofarb Feb 22, 2022
498a0e0
Delete test.txt
nofarb Nov 9, 2022
06e01b4
Delete config directory
nofarb Nov 9, 2022
1ebf669
Delete config_123 directory
nofarb Nov 9, 2022
1c47691
Delete subfolder directory
nofarb Nov 9, 2022
9dcfcdd
Delete .harness directory
nofarb Nov 9, 2022
0ef41fc
Update hello_server_test.go
nofarb Nov 10, 2022
f2d362b
Update hello_server_test.go
nofarb Nov 10, 2022
fa30e4c
Create go.yml
nofarb Nov 15, 2022
7c7d61d
Update pipeline Go Demo
nofarblue Dec 9, 2022
ff62d58
Update pipeline Go Demo
nofarblue Dec 9, 2022
80130ad
Update hello_server.go
shashanksandbox Aug 30, 2023
485684a
Update hello_server.go
shashanksandbox Aug 30, 2023
a8ef1fd
Update hello_server.go
shashanksandbox Aug 30, 2023
79334cf
Update hello_server.go
shashanksandbox Aug 30, 2023
34cb5fb
Update hello_server.go
shashanksandbox Aug 30, 2023
e5dc6ff
Update hello_server.go
shashanksandbox Aug 30, 2023
568c2fe
Update hello_server.go
shashanksandbox Aug 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -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


1 change: 0 additions & 1 deletion .harness/mypipeline.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ $ ./go-sample-app
```bash
$ curl http://localhost:8080?name=Nofar
Hello, Nofar
Test
Test1
```










Expand Down
239 changes: 130 additions & 109 deletions config/.harness/Go_Demo.yaml
Original file line number Diff line number Diff line change
@@ -1,112 +1,133 @@
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
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo
exit 0
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
infrastructure:
type: KubernetesDirect
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:
connectorRef: account.k8scluster
namespace: harness-delegate-pmdemo
serviceDependencies: []
sharedPaths:
- ""
variables:
- name: myStageVar
type: String
value: stageVarValue
- stage:
name: Run Integration Test
identifier: Run_Integration_Test
type: CI
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:
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
connectorRef: account.nofar_dockerhub
image: bluebbb/godemo:<+pipeline.sequenceId>
infrastructure:
useFromStage: Test_Build_and_Push
sharedPaths:
- ""
description: running integ tests
properties:
ci:
codebase:
connectorRef: BS1223
repoName: goHelloWorldServer
build: <+input>
variables:
- name: pipelineVar
type: String
value: pipelineVarValue
26 changes: 0 additions & 26 deletions config/.harness/nofar_demo.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions config_123/.harness/go_pipeline.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions config_123/.harness/pipeline345.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion hello_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func CreateGreeting(name string) string {
if name == "" {
name = "Guest"
}
return "Hello, " + name + "\n"
return "Hellooooo111, " + name + "\n"
}

func main() {
Expand Down
Loading