For the complete documentation index, see llms.txt. This page is also available as Markdown.

Go

Create a Pipeline for a Go codebase.

This guide covers configuring continuous integration pipelines for Go projects that use Go Modules.

Build and Test

In the below example we demonstrate a pipeline that executes go test and go build commands. These commands are executed inside the golang Docker container, downloaded at runtime from DockerHub.

kind: pipeline
spec:
  stages:
  - type: ci
    spec:
      steps:
      - name: test
        type: run
        spec:
          container: golang
          script: |
            go build
            go test

Test Multiple Versions

You can configure multiple, containerized steps to test against multiple versions of Go.

Please note that you can use any Docker image in your pipeline from any Docker registry. You can use the official golang images, or your can bring your own.

Last updated

Was this helpful?