Skip to content
Open
Changes from all commits
Commits
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
116 changes: 116 additions & 0 deletions .harness/Test_pipeline_dependancies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
pipeline:
name: Test pipeline dependancies
identifier: Test_pipeline_dependancies
projectIdentifier: James_Test_project
orgIdentifier: default
tags: {}
properties:
ci:
codebase:
connectorRef: account.james_demo_git
repoName: cibeta
build: <+input>
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.james_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
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.james_dockerhub
repo: bluebbb/godemo
tags:
- <+pipeline.sequenceId>
optimize: true
- step:
type: Run
name: show workspace content
identifier: show_workspace_content
spec:
connectorRef: account.james_dockerhub
image: alpine
command: ls
privileged: false
infrastructure:
type: KubernetesDirect
spec:
connectorRef: account.cidemoact
namespace: default
serviceDependencies: []
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.james_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.james_dockerhub
image: alpine
command: echo "hello"
privileged: false
serviceDependencies:
- identifier: runhelloworldserver
name: Run Hello World Server
type: Service
spec:
connectorRef: account.james_dockerhub
image: bluebbb/godemo:<+pipeline.sequenceId>
infrastructure:
useFromStage: Test_Build_and_Push
sharedPaths:
- ""
description: running integ tests
variables:
- name: pipelineVar
type: String
value: pipelineVarValue