harness.io : setting up dotnet build app with integration to github
Haness is getting popular these days and it is important to learn how to do things with it. We will build a hello world application with it.
First you need an account with harness and github repository which are integrated via token.
In the github repo - dotnet-hello, we will create a folder called .harness which contains pipeline yaml
The yaml looks something like this. At the moment the default agent supports dotnet 9 and not dotnet 10 or 11.
pipeline:
identifier: Build_kepungnzai_dotnet_hello_1796420381212
name: Build dotnet-hello
orgIdentifier: default
projectIdentifier: default_project
properties:
ci:
codebase:
build: <+input>
connectorRef: account.Github
repoName: kepungnzai/dotnet-hello
stages:
- stage:
identifier: build
name: build
spec:
caching:
enabled: true
cloneCodebase: true
execution:
steps:
- step:
identifier: echo
name: echo
spec:
command: echo hello world
timeout: ""
type: Run
- step:
type: Run
name: Restore
identifier: Restore
spec:
shell: Bash
command: dotnet restore
- step:
type: Run
name: Build
identifier: Build
spec:
shell: Bash
command: dotnet build --configuration Release --no-restore
platform:
arch: Amd64
os: Linux
runtime:
spec: {}
type: Cloud
type: CI
This is the output of our run


Comments