edgeXBuildGoMod
Shared Library to build Go projects using Go Modules. It invokes edgeXBuildGoApp with some default parameters.
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'
Usage
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: 'https://nexus3.edgexfoundry.org/repository/go-proxy/',
useAlpineBase: true,
dockerFilePath: 'Dockerfile',
dockerBuildFilePath: 'Dockerfile.build',
dockerBuildContext: '.',
dockerBuildArgs: [],
dockerNamespace: '',
dockerImageName: 'docker-go-project',
dockerNexusRepo: 'staging',
buildImage: false,
pushImage: false,
semverBump: 'pre',
buildSnap: false,
publishSwaggerDocs: false,
swaggerApiFolders: ['openapi/v1'],
failureNotify: 'edgex-tsc-core@lists.edgexfoundry.org,edgex-tsc-devops@lists.edgexfoundry.org',
buildExperimentalDockerImage: false,
artifactTypes: ['docker'],
artifactRoot: 'archives/bin',
arch: ['amd64', 'arm64']
)