Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix edgex-ui-go to use new go modules build job #356

Closed
anonymouse64 opened this issue Apr 29, 2019 · 2 comments · Fixed by #358
Closed

Fix edgex-ui-go to use new go modules build job #356

anonymouse64 opened this issue Apr 29, 2019 · 2 comments · Fixed by #358

Comments

@anonymouse64
Copy link
Contributor

The edgex-ui-go master branch recently switched to using go modules, and now has jenkins jobs failing. See for example: https://jenkins.edgexfoundry.org/job/edgex-ui-go-master-verify-go/46/console from edgexfoundry/edgex-ui-go#85

I think the reason for this is that the default version of go is too old and doesn't support modules by default, and so we need to use the updated version of go that we use for i.e. edgex-go. AFAICT, for the edgex-go jobs this is accomplished in the job definition yaml with this snippet:

stream:
- 'master':
branch: 'master'
pre_build_script: !include-raw-escape: shell/install_custom_golang.sh
build_script: 'make test && make build docker'
go-root: '/opt/go-custom/go'

Does that mean all we need to do to get this to work on edgex-ui-go is to add that go-root spec to the master stream?

@eb-oss
Copy link
Member

eb-oss commented Apr 29, 2019

Yes, I think you'll need the install_custom_golang.sh script and the go-root definition. But it looks like edgex-ui-go.yaml has a global pre_build_script already defined, so you'll need to make sure that overwriting that won't break anything.

@anonymouse64
Copy link
Contributor Author

After adding those to the master stream for edgex-ui-go, unfortunately the build still fails, however it seems the issue could be with some missing dependencies not checked into the go.mod file. I am investigating with edgexfoundry/edgex-ui-go#87

anonymouse64 added a commit to anonymouse64/ci-management that referenced this issue Apr 30, 2019
This allows go modules to work properly

Fixes edgexfoundry#356

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants