-
Notifications
You must be signed in to change notification settings - Fork 127
Add script to trigger Jenkins jobs #1142
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
Conversation
0ccc768 to
eea1bf7
Compare
🌐 Coverage report
|
3c3d561 to
614e9cf
Compare
4b89db4 to
366ae25
Compare
366ae25 to
4bbda42
Compare
| echo "✅ gsutil is installed" | ||
| fi | ||
|
|
||
| gsutil help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a script a placeholder for another one that will come later? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script should replace the logic to signing a package and publishing it.
Currently, it is here just a placeholder as you mention and it allowed me to check that gsutil command is available.
| if err != nil { | ||
| return nil, err | ||
| } | ||
| // Jenkins queue API has about 4.7second quiet period |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. What is this comment about? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is based on https://github.com/bndr/gojenkins/blob/master/jenkins.go#L282
Latest version published of this module does not have the latest changes of this method. With the method GetBuildFromQueueID from version 1.1.0 it didn't work.
| // or more contributor license agreements. Licensed under the Elastic License; | ||
| // you may not use this file except in compliance with the Elastic License. | ||
|
|
||
| package main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. Move this common logic to a separate package so it is later easier to reuse it in other projects. It may be also nice to have this as a buildkite plugin ;)
This PR introduces the scripts to trigger Jenkins jobs from buildkite:
Added the credentials for Jenkins in the pre-command hook.
Missing credentials to upload packages to the corresponding Google Storage Buckets.
Example to trigger the publishing job: