go-build

JFrog Pipelines Documentation

Products
JFrog Pipelines
Content Type
User Guide
ft:sourceType
Paligo

This Pipelines Task performs a build from Go (GoLang) source.

This task performs the following:

  • Creates go build configuration required for jfrog cli

  • Performs go build using Artifactory repository for resolving dependencies

Prerequisites

Usage

Basic:

- task: jfrog/go-build@v0.0.1
  id: go-app-build
  input:
   gitResourceName: go_app_gitrepo
   executionLocation: ""
   sourceRepository: go-virtual
   outputLocation: ${step_tmp_dir}
   outputFile: myapp
   rtIntegrationName: int_default_artifactory
   goCommand: "" 

Input Variables

Name

Required

Default

Description

gitResourceName

true

Resource name for performing Go build

executionLocation

false

false

Current directory of resource

sourceRepository

true

 

Repository name for resolving dependencies

rtIntegrationName

true

 

JFrog Platform Access Token integration or Artifactory integration name

goCommand

false

build -o

Command to be run if it is not build -o

Output Variables

None

Exported Environment Variables

None

How does it work?

This task creates required configuration for resolving dependencies from Artifactory repository by navigating to gitResourceName path and execution location. Performs Go build if goCommand is not configured, else takes the goCommand by resolving dependencies from sourceRepository.

License

This project is licensed under Apache 2.0 license.