An error occurred while fetching the assigned milestone of the selected merge_request.
Change output path to be picked up by artifact upload
1 unresolved thread
1 unresolved thread
Because Gitlab CI can't upload artifacts from outside the build dir, and Go by default builds outside of that, we need to output to the build dir for artifact upload.
Merge request reports
Activity
29 29 compile: 30 30 stage: build 31 31 script: 32 - go build -race -ldflags "-extldflags '-static'" -o mybinary 32 - go build -race -ldflags "-extldflags '-static'" -o $CI_PROJECT_DIR/mybinary This should be in quotes:
"$CI_PROJECT_DIR/mybinary"
, also: since cwd is$CI_PROJECT_DIR
why this is needed?cc @dvdmuckle @zj
In tests, my Go binary was not picked up when built with arguments similar to the previous template. Outputting to
$CI_PROJECT_DIR/mybinary
and picking up the artifactmybinary
worked. As for the use of quotes, I defer that choice to you and @zj.
Please register or sign in to reply