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

Trigger docker image build after successful bundle build dashboards #929

Merged

Conversation

zelinh
Copy link
Member

@zelinh zelinh commented Nov 9, 2021

Signed-off-by: Zelin Hao [email protected]

Description

Add docker build trigger after bundle builds dashboards

Issues Resolved

part of #908 for dashboards

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@zelinh zelinh requested a review from a team as a code owner November 9, 2021 23:58
@zelinh zelinh self-assigned this Nov 9, 2021
Copy link
Member

@peterzhuamazon peterzhuamazon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@zelinh zelinh force-pushed the jenkins-dashboards-docker-build branch from cda9880 to e481477 Compare November 10, 2021 00:26
@zelinh zelinh merged commit e521373 into opensearch-project:main Nov 10, 2021
@zelinh zelinh deleted the jenkins-dashboards-docker-build branch November 10, 2021 00:49
@@ -131,6 +131,19 @@ pipeline {
success {
node('Jenkins-Agent-al2-x64-c54xlarge-Docker-Host') {
publishNotification(":white_check_mark:", "Successful Build", "\n${getAllJenkinsMessages()}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for #928, this notifies before it finishes, potentially hiding the error/failing the workflow in a success step.

Any reason why building a docker image isn't a regular step in the workflow?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for #928, this notifies before it finishes, potentially hiding the error/failing the workflow in a success step.

Any reason why building a docker image isn't a regular step in the workflow?

Because I think we don't wish to build the docker image if the bundle build workflow fails. Furthermore, our approach to trigger the docker-build workflow will take the tarballs from successful bundle build.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the pipeline workflow there are serial and parallel stages. If in series, if a previous stage fails it will prevent the docker image from being created. Creating docker image does not have to happen via job invocation as done here, it can be included in this pipeline as a stage, which this is a form of code sharing the code @dblock just created a code review for a much more testable mechanism.

We have written in these jenkinsfiles in a fragile way for haste, great bias for action. Lets update this code to be more maintainable by creating an issue to clean up the following areas:

  • Use the generated manifest files to lookup the artifacts, removing duplication of url generation, stashing the manifest would be appropriate
  • Move docker image generation into a new stage and add notifications after it has finished
  • Move docker image generation code into shared library

I recommend we do these one at a time to ease troubleshooting and speed it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants