Skip to content


Shared Library to build Go projects using Go Modules. It invokes edgeXBuildGoApp with some default parameters.


The parameters are similar to shared Library edgeXBuildGoApp with a few exceptions in default values of some parameters.

buildImage: false,
pushImage: false,
semverBump: 'pre'
** Note:** These parameters are not overridable.


Basic example

edgeXBuildGoMod (
   project: 'go-mod-configuration'

Full example

This example shows all the settings that can be specified and their default values.

edgeXBuildGoMod (
    project: 'go-project',
    mavenSettings: 'go-project-settings',
    semver: true,
    testScript: 'make test',
    buildScript: 'make build',
    goVersion: '1.16',
    goProxy: '',
    useAlpineBase: true,
    dockerFilePath: 'Dockerfile',
    dockerBuildFilePath: '',
    dockerBuildContext: '.',
    dockerBuildArgs: [],
    dockerNamespace: '',
    dockerImageName: 'docker-go-project',
    dockerNexusRepo: 'staging',
    buildImage: false,
    pushImage: false,
    semverBump: 'pre',
    buildSnap: false,
    publishSwaggerDocs: false,
    swaggerApiFolders: ['openapi/v1'],
    failureNotify: ',',
    buildExperimentalDockerImage: false,
    artifactTypes: ['docker'],
    artifactRoot: 'archives/bin',
    arch: ['amd64', 'arm64']