edwinakatosh / go-bamboo-plugin Goto Github PK
View Code? Open in Web Editor NEWPlugin for Atlassian Bamboo that adds support for Go language projects
License: Apache License 2.0
Plugin for Atlassian Bamboo that adds support for Go language projects
License: Apache License 2.0
We are encountering some issues with this plugin.
2016-06-16 13:16:21,328 INFO [15-BAM::Local Agent 1::Agent:pool-30-thread-1] [TaskResultBuilder] CGA-LIS2-BP-16: Failing task since return code of [/usr/local/go/bin/go test -v ./...] was -1 while expected 0 2016-06-16 13:16:21,328 INFO [15-BAM::Local Agent 1::Agent:pool-30-thread-1] [TaskResultBuilder] Process exception: com.atlassian.utils.process.ProcessTimeoutException: process timed out at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:663) at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:161) at com.atlassian.utils.process.ExternalProcessImpl.execute(ExternalProcessImpl.java:114) at com.handcraftedbits.bamboo.plugin.go.task.common.ProcessHelper.executeProcess(ProcessHelper.java:95) at com.handcraftedbits.bamboo.plugin.go.task.test.GoTestTaskType.execute(GoTestTaskType.java:90) at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$120(TaskExecutorImpl.java:269) at com.atlassian.bamboo.task.TaskExecutorImpl$$Lambda$209/825808799.call(Unknown Source) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:269) at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:108) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:214) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:136) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745)
We believe this is due to the plugin ProcessHelper using the default com.atlassian.utils.process.ExternalProcess timeout setting.
Can this be configurable? Sort of like this?
https://github.com/smitcham/bamboo-git-plugin/blob/master/src/main/java/com/atlassian/bamboo/plugins/git/GitCommandProcessor.java#L350
I have go 1.7.4 installed.
in ~/.bashrc
export GOPATH=/root/golang
export GOROOT=/root/go
export PATH=$PATH:$GOPATH/bin
/root/golang is a symlink to /root/.gvm/... and the version of go that is current.
when the build runs:
Failing task since return code of [/root/golang/bin/godep restore] was -1 while expected 0
In the bamboo data folder and project build dir the code is in there. I've tried building it by hand by running:
godep restore
godep: [WARNING]: godep should only be used inside a valid go package directory and
godep: [WARNING]: may not function correctly. You are probably outside of your $GOPATH.
godep: [WARNING]: Current Directory: /home/atlassian/atlassian_data/bamboo_data/xml-data/build-dir/HEL-AD-DJ/src/myprojecthere/server
godep: [WARNING]: $GOPATH: /root/golang
I don't quite understand why it's failing or how to figure out what's causing it to fail.
This might be me, but when I try to do something like:
'./... -linkmode external -extldflags "-static"'
as the package mode, I get errors like
17-Mar-2017 14:13:22 can't load package: package -linkmode: cannot find package "-linkmode" in any of:
17-Mar-2017 14:13:22 /usr/local/go/src/-linkmode (from $GOROOT)
17-Mar-2017 14:13:22 /opt/bamboo-agent/agent1/xml-data/build-dir/ION-ION-JOB1/src/-linkmode (from $GOPATH)
17-Mar-2017 14:13:22 can't load package: package external: cannot find package "external" in any of:
17-Mar-2017 14:13:22 /usr/local/go/src/external (from $GOROOT)
17-Mar-2017 14:13:22 /opt/bamboo-agent/agent1/xml-data/build-dir/ION-ION-JOB1/src/external (from $GOPATH)
17-Mar-2017 14:13:22 can't load package: package -extldflags: cannot find package "-extldflags" in any of:
17-Mar-2017 14:13:22 /usr/local/go/src/-extldflags (from $GOROOT)
17-Mar-2017 14:13:22 /opt/bamboo-agent/agent1/xml-data/build-dir/ION-ION-JOB1/src/-extldflags (from $GOPATH)
17-Mar-2017 14:13:22 can't load package: package "-static"': cannot find package "\"-static\"'" in any of:
17-Mar-2017 14:13:22 /usr/local/go/src/"-static"' (from $GOROOT)
17-Mar-2017 14:13:22 /opt/bamboo-agent/agent1/xml-data/build-dir/ION-ION-JOB1/src/"-static"' (from $GOPATH)
This happens with and without quotes, with any flag I've tried. Is something wrong with the plugin or is it me?
Rather than having separate tasks.
Include screenshots, examples and step-by-step instructions .. any problems the end user might run into
When using the build task (and possibly others) and supplying -ldflags
(and presumably also -asmflags
, -gccgoflags
, -gcflags
, -tags
and -toolexec
, all of which accept a quoted list of values), the plugin is unable to parse the command line, presumably because the command is being space-delimited.
The command being run is:
go install -ldflags '-X main.version=112 -X main.buildID=ABC-112' ./cmd/exename
but the error indicates that the string inside the quotation marks has been incorrectly split:
invalid value "'-X" for flag -ldflags: unterminated ' string
Using "
instead had the same effect, and attempting to escape the spaces with \
also did not work.
Fix minor issues in documentation (e.g., using italics instead of code blocks for certain values).
Update the version of handcraftedbits-parent being used so we can get code quality checking at build time.
Hello! It looks like the plugin isn't available for Bamboo 6.3.0, according to the description in your marketplace. If I search for the plugin in my Bamboo 6.3.0 installation, it will not appear at all in the results.
Are you planning on building it for 6.3.0?
Thanks!
Use handcraftedbits-parent as parent POM.
Create a widget for adding/removing packages to build/test instead of using a freeform textarea.
Create a converter that can take go test -cover
output and convert it into Clover format.
Instead of Clover support as in #4, create a merged go tool cover -html
output file that can be (dynamically?) added to the build as an artifact.
Go Plugin for Bamboo is compiled against Java 7 but GoArgumentList.toString() uses String.join(), which is a Java 8 method.
When I specifically configure the GOROOT to a non-default go install it uses "/usr/lib/golang/bin/go" anyways? If it's also going to use /usr/lib/golang/bin/go then why is the GOROOT field required.
With glide coming full on in 1.6, will it be supported by the plugin?
Could you update the Bamboo version compatibility? Thanks
Add build-time go get -v
support to fetch binaries like Godep automatically and cache them for later use.
I must be missing something - the go test task exits with non-zero when a test fails, this means the next task which is meant to be the test parser never runs, which means my tests don't get parsed and shown in the interface.
Is this by design, or have I done something horribly wrong in my setup somewhere?
Failing test - skips to running post build steps ...
build 12-Oct-2016 14:29:34 FAIL build 12-Oct-2016 14:29:34 exit status 1 build 12-Oct-2016 14:29:34 FAIL bitbucket.org/fusemail/fm-utility-golang-trackerdb 0.007s simple 12-Oct-2016 14:29:34 Failing task since return code of [/usr/local/go/bin/go test -v .] was 1 while expected 0 simple 12-Oct-2016 14:29:34 Finished task 'Test' with result: Failed simple 12-Oct-2016 14:29:34 Running post build plugin 'NCover Results Collector'
Successful test - runs the test parser ...
build 12-Oct-2016 14:26:36 --- PASS: TestBase62 (0.00s) build 12-Oct-2016 14:26:36 PASS build 12-Oct-2016 14:26:36 ok bitbucket.org/fusemail/fm-utility-golang-trackerdb 0.004s simple 12-Oct-2016 14:26:36 Finished task 'Test' with result: Success simple 12-Oct-2016 14:26:36 Starting task 'Parse Tests' of type 'com.handcraftedbits.bamboo.plugin.go:task.go.test.parser' simple 12-Oct-2016 14:26:36 Parsing test results under /var/lib/bamboo/xml-data/build-dir/GO-TRAC-JOB1... simple 12-Oct-2016 14:26:36 Finished task 'Parse Tests' with result: Success
Hello
Go plugin is compatible with bamboo 6.1.4 at this moment. Is it possible to build Go plugin compatible with bamboo version 6.2.2? Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.