Step 1 of 4
Build Software
Build software with Harness
Updated Sep 13, 2026 · Shawn Pearson
Goals
We'll setup a CI Pipeline with source code tests, build, and then push the artifact to a remote repository!
Steps
-
In Harness:
click: # Projects (blue bar) 1 Your Project: {{project}} 2 -
If you see the Welcome screen with Get Started pane, kick it to the curb with the "X" top right.
Create the pipeline
-
In your project:
click: # Projects (blue bar) 1 Your Project: {{project}} 2 -
In the box that pops up:
click: # value Name 1 Python BuildInline 2 Start 3 Inline vs Remote
We're using inline for this lab, but you can also use a remote repository like GitHub. This is useful for teams that want to keep their pipelines as code bundled up snuggly with application code. Cozy!
-
then:
click: # Add Stage 1 build 2 -
then:
click: # Value stage name 1 BuildClone Codebase 2 Repository 3 Catalogapi-norefs Set Up Stage 4 Configure the infrastructure and tests
-
On the infrastructure page:
click: # Cloud 1 Continue 2 Harness Cloud is the BESTEST cloud
Something awesome happened right there. With zero configuration (well ok... ooooooone click!) you instantly configured an autoscaling build environment in the cloud that requires no management on your part and is dramatically less expensive than on-premise.
Plus Harness is using the fastest bare-metal hardware in the Solar System. Seriously. Astronauts checked. -
On the execution page:
click: # Add Step 1 Add Step 2 -
In the Step Library:
click: # Value (optional) 1 testsTest Intelligence 2 -
In the Run Tests pane: 1 name the test
Run Tests with Intelligence, 2 choose python, 3 Pytest, 4 Click Additional Configuration to expand......5 copy and paste the install command below into the Pre-Command field...
Shell pip install pytest & cd ./python-tests... then: 6 click Apply Changes
Leverage a template for software build!
-
Back in the Execution pane: 1 click Add Step, 2 click Use Template
-
In the Template Library: 1 click Compile Application, 2 click Use Template (far bottom right of screen)
-
In the template box: 1 name the template
Compile, 2 click Apply ChangesSave the completed build artifact
-
Back in the Execution pane: 1 click Add Step, 2 click Add Step
-
In the Step Library: 1 type
dockerin search box, 2 click Build and Push an image to Dockerhub -
In the Build and Push pane:
1 name the stepPush to DockerHub
2 selectdockerhubfor Docker Connector
3 for Docker Respository paste:Shell nikpap/harness-workshop4 click +Add in Tags, then paste:
Shell <+variable.username>-<+pipeline.sequenceId>5 Click Optional Configuration to expand
6 For DockerFile paste:Shell /harness/frontend-app/harness-webapp/Dockerfile7 For Context paste:
Shell /harness/frontend-app/harness-webapp8 Click Apply Changes. That was the biggest step in the workshop, you did it! ⭐️
-
In the top right of Pipeline Studio: 1 click Save, 2 click Run
Note
You might have noticed an option to pick the branch before running the pipeline. We're using
mainfor simplicity, but it's a great example of how this complete build pipeline could easily be reused for other branches (or repositories or services).