-
Notifications
You must be signed in to change notification settings - Fork 127
Add more stages to main buildkite pipeline #1130
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
🌐 Coverage report
|
ba27a37 to
4703e65
Compare
In jenkins it is needed, but in Buildkite as the repository is not shallow, the --unshallow parameter should be removed
This requires to install in the VM created in GCP gvm, golang, docker-compose , kind and kubectl binaries. Golang installation requires to add some environment variables to the PATH as GOPATH.
29c4cf6 to
f6c8544
Compare
adbb44e to
a46fc29
Compare
a46fc29 to
663bab8
Compare
fea81fa to
70d17cb
Compare
70d17cb to
fc6229d
Compare
83081c5 to
0f8f137
Compare
Add chocolatey profile Create target for windows in Makefile
0f8f137 to
d62d3ee
Compare
d62d3ee to
f6637a5
Compare
d884a76 to
5454e7c
Compare
| echo " - label: \":go: Running integration test: ${test}\"" | ||
| echo " command: ./.buildkite/scripts/integration_tests.sh -t ${test}" | ||
| echo " agents:" | ||
| echo " provider: \"gcp\"" |
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.
Provider gcp is required to use docker-like commands.
.buildkite/hooks/pre-command
Outdated
| } | ||
|
|
||
| GCP_SERVICE_ACCOUNT_SECRET_PATH=secret/ci/elastic-elastic-package/gcp-service-account | ||
| AWS_SERVICE_ACCOUNT_SECRET_PATH=secret/ci/elastic-elastic-package/elastic-temp-aws-account-auth |
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.
Should this be moved to the ci-shared path ?
This credential should be updated.
The advantage of moving it already to the shared path is that no other PR should be required to update this file.
If it is moved, what about this path kv/ci-shared/platform-ingest/aws_account_auth ?
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.
Moved this credential to the ci-shared path
|
/test |
| cpu: "8" | ||
| memory: "4G" | ||
|
|
||
| - wait: ~ |
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.
Why we are adding this wait step?
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 wait forces that the two steps defined previously (Run check static and Run unit tests) are finished before executing the following ones.
I wanted to force that way, so in case one of these two steps fail, integration tests are not run. Same behavior as in Jenkins.
|
As it is now the status of this Buildkite pipeline, there are a some differences from what it is running in Jenkins:
Given that, I would keep the Jenkins workflow for now too, WDYT ? @jsoriano @alexsapran @jlind23 |
|
@mrodm I would rather remove the Jenkins job and create follow up issue for Buildkite pipeline otherwise I think we will keep both for a while. |
I think we want this, otherwise concurrent PRs can break main branches, specially on busy repositories. It is a pity that Buildkite doesn't offer it. Maybe we can explore the use of Github merge queues (beta) for this https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue. We could give it a try.
Perhaps we can ignore this by now, and have an explicit task on next sprint to explore alternatives. I see this as a nice to have by now.
I would only consider a blocker the first point, as this can affect development. For the reports I would be ok if we lose this by now, but have an specific plan to solve it soon. |
|
Currently, testing for the first point this plugin: Probably, it would require to change some settings in the buildkite pipeline definition to disable |
Instead of using pull/id/merge , a merge commit is created manually. Github reference is not updated in case there is a conflict and it could cause that Buildkite runs the pipeline in an old changeset.
|
Following the idea in https://github.com/seek-oss/github-merged-pr-buildkite-plugin, it has been added a new post-checkout hook in the repository (
That new temporal branch with the merge commit is the one to be tested/run in each step. This process is repeated for each step in the pipeline. |
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.
Overall LGTM, I think that we are increasing the complexity with these buildkite pipelines based on bash, but I guess that we will get used to it as we migrate more things.
|
|
||
| - label: "Junit annotate" | ||
| - label: ":pipeline: Trigger Integration tests" | ||
| command: ".buildkite/pipeline.trigger.integration.tests.sh | buildkite-agent pipeline upload" |
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.
There is a bit of complexity here. To run integration tests we have this stack of scripts:
.buildkite/pipeline.ymlpipeline.trigger.integration.tests.sh./.buildkite/scripts/integration_tests.shmaketargetsscripts/test-...
There would be any option to reduce this complexity? Maybe we can remove the make targets and call directly the scripts? Though the make targets can be useful to reproduce locally with the same parameters.
Or most of the things integration_tests.sh does is to install things, could this be also done by providing an image with these dependencies?
Food for thought, no need to do anything about this on this PR.
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.
That's true, there are more scripts than before with Jenkins. All that logic was defined inside the same groovy file (.ci/Jenkinsfile) i.e. triggering dynamically stages in Jenkins depending on the existing test folders, using specific commands in each one.
Maybe we can remove the make targets and call directly the scripts? Though the make targets can be useful to reproduce locally with the same parameters.
As you mention, I would keep make targets since they are helpful to run and test everything locally.
Or most of the things integration_tests.sh does is to install things, could this be also done by providing an image with these dependencies?
Those dependencies installed in integration_tests.sh probably they could be moved to a custom agent image. It would also make the builds faster since each step would not install everything.

This PR adds into the Buildkite pipeline that migrates this Jenkins pipeline the following stages/steps:
Examples tested:
Pending