Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hello_server.go #50

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
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
242288e
Merge pull request #1 from shashanksandbox/testbranch
shashanksandbox Aug 30, 2023
34cb5fb
Update hello_server.go
shashanksandbox Aug 30, 2023
e5dc6ff
Update hello_server.go
shashanksandbox Aug 30, 2023
ffbbde9
Merge pull request #2 from shashanksandbox/testbranch
shashanksandbox Aug 30, 2023
1e38c99
Create pipeline myfirstdeployment
shashanksandbox Sep 1, 2023
379e710
Create deployment.yaml
shashanksandbox Sep 1, 2023
d3f8cf1
Create inputset myinputset
shashanksandbox Sep 1, 2023
a4b1ad6
Create template myfile
shashanksandbox Sep 1, 2023
9207a7e
Create pipeline deployk8s
shashanksandbox Sep 4, 2023
96c8683
Update pipeline deployk8s
shashanksandbox Sep 4, 2023
3feebde
Update pipeline deployk8s
shashanksandbox Sep 4, 2023
d661ffd
Update pipeline deployk8s
shashanksandbox Sep 4, 2023
7306869
Update pipeline deployk8s
shashanksandbox Sep 4, 2023
cd7dbbc
Update pipeline deployk8s
shashanksandbox Sep 4, 2023
4478a15
Update pipeline deployk8s
shashanksandbox Sep 4, 2023
ad36579
Update deployment.yaml
shashanksandbox Sep 6, 2023
95d36f8
Create pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 2023
8613bd8
Update pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 2023
80a821c
Update pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 2023
1e71b6e
Update pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 2023
1b91638
Update pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 2023
557bfe1
Update pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 2023
129444b
Update pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 2023
80f67e9
Update pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 2023
3dd1759
Update pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 2023
c88889a
Update pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 2023
e374025
Update pipeline Test_Shell_Script_Pipeline
shashanksandbox Sep 19, 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
60 changes: 60 additions & 0 deletions .harness/Test_Shell_Script_Pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
pipeline:
name: Test_Shell_Script_Pipeline
identifier: Test_Shell_Script_Pipeline
projectIdentifier: shashank_sandbox
orgIdentifier: default
tags: {}
properties:
ci:
codebase:
connectorRef: shashank_github
repoName: goHelloWorldServer
build: <+input>
stages:
- stage:
name: test_build
identifier: test_build
description: ""
type: CI
spec:
cloneCodebase: true
execution:
steps:
- step:
type: Run
name: Run_1
identifier: Run_1
spec:
connectorRef: Shashank_docker
image: golang:1.15
shell: Sh
command: |
go get gotest.tools/gotestsum
gotestsum --format=standard-verbose --junitfile unit-tests.xml || true
sleep 5m
testresult="passed"
testfail=$(grep -c "<failure" *.xml)
if [ $testfail == 1 ]
then
testresult="failed"
else
testresult="passed"
fi
echo $testresult
export testresult
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo
reports:
type: JUnit
spec:
paths:
- "**/*.xml"
outputVariables:
- name: testresult
infrastructure:
type: KubernetesDirect
spec:
connectorRef: account.shashankcluster
namespace: harness-delegate-ng
automountServiceAccountToken: true
nodeSelector: {}
os: Linux
85 changes: 85 additions & 0 deletions .harness/deployk8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
pipeline:
name: deployk8s
identifier: deployk8s
projectIdentifier: default_project
orgIdentifier: default
tags: {}
stages:
- stage:
name: deploy_QA
identifier: deploy_QA
description: ""
type: Deployment
spec:
deploymentType: Kubernetes
service:
serviceRef: myapp
serviceInputs:
serviceDefinition:
type: Kubernetes
spec:
artifacts:
primary:
primaryArtifactRef: <+input>
sources: <+input>
environment:
environmentRef: qa_env
deployToAll: false
infrastructureDefinitions:
- identifier: myinfra
execution:
steps:
- step:
type: TerraformPlan
name: TerraformPlan
identifier: TerraformPlan_1
spec:
provisionerIdentifier: qa987
configuration:
command: Apply
configFiles:
store:
spec:
connectorRef: Shashank_github_connector
repoName: terraform-provider-kubernetes
gitFetchType: Branch
branch: main
folderPath: _examples/gke
type: Github
moduleSource:
useConnectorCredentials: false
secretManagerRef: account.harnessSecretManager
skipRefreshCommand: false
timeout: 10m
- step:
type: HarnessApproval
name: HarnessApproval_1
identifier: HarnessApproval_1
spec:
approvalMessage: Please review the following information and approve the pipeline progression
includePipelineExecutionHistory: true
isAutoRejectEnabled: false
approvers:
userGroups:
- mygroup
minimumCount: 1
disallowPipelineExecutor: false
approverInputs: []
timeout: 1d
- step:
type: TerraformApply
name: TerraformApply_1
identifier: TerraformApply_1
spec:
provisionerIdentifier: qa987
configuration:
type: InheritFromPlan
timeout: 10m
rollbackSteps: []
tags: {}
failureStrategies:
- onFailure:
errors:
- AllErrors
action:
type: Abort
54 changes: 54 additions & 0 deletions .harness/myfirstdeployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
pipeline:
name: myfirstdeployment
identifier: myfirstdeployment
projectIdentifier: shashank_sandbox
orgIdentifier: default
tags: {}
stages:
- stage:
name: QA
identifier: QA
description: ""
type: Deployment
spec:
deploymentType: Kubernetes
service:
serviceRef: myhelloworld
serviceInputs:
serviceDefinition:
type: Kubernetes
spec:
artifacts:
primary:
primaryArtifactRef: <+input>
sources: <+input>
environment:
environmentRef: mykubernates
deployToAll: false
infrastructureDefinitions:
- identifier: myinfra
execution:
steps:
- step:
name: Rollout Deployment
identifier: rolloutDeployment
type: K8sRollingDeploy
timeout: 10m
spec:
skipDryRun: false
pruningEnabled: false
rollbackSteps:
- step:
name: Rollback Rollout Deployment
identifier: rollbackRolloutDeployment
type: K8sRollingRollback
timeout: 10m
spec:
pruningEnabled: false
tags: {}
failureStrategies:
- onFailure:
errors:
- AllErrors
action:
type: StageRollback
25 changes: 25 additions & 0 deletions .harness/myinputset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
inputSet:
name: myinputset
identifier: myinputset
orgIdentifier: default
projectIdentifier: shashank_sandbox
pipeline:
identifier: myfirstdeployment
stages:
- stage:
identifier: QA
type: Deployment
spec:
service:
serviceInputs:
serviceDefinition:
type: Kubernetes
spec:
artifacts:
primary:
primaryArtifactRef: myimage
sources:
- identifier: myimage
type: DockerRegistry
spec:
digest: <+input>
56 changes: 56 additions & 0 deletions config/myfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
template:
name: myfile
type: Pipeline
projectIdentifier: shashank_sandbox
orgIdentifier: default
spec:
stages:
- stage:
name: QA
identifier: QA
description: ""
type: Deployment
spec:
deploymentType: Kubernetes
service:
serviceRef: myhelloworld
serviceInputs:
serviceDefinition:
type: Kubernetes
spec:
artifacts:
primary:
primaryArtifactRef: <+input>
sources: <+input>
environment:
environmentRef: mykubernates
deployToAll: false
infrastructureDefinitions:
- identifier: myinfra
execution:
steps:
- step:
name: Rollout Deployment
identifier: rolloutDeployment
type: K8sRollingDeploy
timeout: 10m
spec:
skipDryRun: false
pruningEnabled: false
rollbackSteps:
- step:
name: Rollback Rollout Deployment
identifier: rollbackRolloutDeployment
type: K8sRollingRollback
timeout: 10m
spec:
pruningEnabled: false
tags: {}
failureStrategies:
- onFailure:
errors:
- AllErrors
action:
type: StageRollback
versionLabel: MyDeploymentTemplate
identifier: myfile
20 changes: 20 additions & 0 deletions deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: guestbook-ui
spec:
replicas: 3
revisionHistoryLimit: 3
selector:
matchLabels:
app: guestbook-ui
template:
metadata:
labels:
app: guestbook-ui
spec:
containers:
- image: gcr.io/heptio-images/ks-guestbook-demo:0.1
name: guestbook-ui
ports:
- containerPort: 80
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 "Hellooooo11, " + name + "\n"
}

func main() {
Expand Down