-
Notifications
You must be signed in to change notification settings - Fork 127
Remove stages related to tests from Jenkinsfile #1147
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
b51546e to
43560e1
Compare
088bd96 to
cb5cf39
Compare
| JOB_GCS_EXT_CREDENTIALS = 'fleet-ci-gcs-plugin-file-credentials' | ||
| ELASTIC_PACKAGE_GCP_SECRET = 'secret/observability-team/ci/service-account/elastic-package-gcp' | ||
| ELASTIC_OBSERVABILITY_PROJECT_ID = 'elastic-observability' | ||
| BUILDKITE_MERGE_COMMIT = "79ee1738578deac17f8f5caf8d925db6244ab6df" |
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.
Commit reference for the merge commit where the buildkite pipeline was merged:
79ee173
| githubEnv() | ||
| r = sh(label: 'Check', returnStatus: true, script: ''' | ||
| echo "Base commit: ${GIT_BASE_COMMIT}" | ||
| git log --format=%H "${GIT_BASE_COMMIT}" | grep "${BUILDKITE_MERGE_COMMIT}" |
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.
Not able to check with git branch --contains command. So finally, it just checks the full log from the GIT_BASE_COMMIT
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.
Well, looks good. In any case this is temporary till we completely remove jenkins.
| githubEnv() | ||
| r = sh(label: 'Check', returnStatus: true, script: ''' | ||
| echo "Base commit: ${GIT_BASE_COMMIT}" | ||
| git log --format=%H "${GIT_BASE_COMMIT}" | grep "${BUILDKITE_MERGE_COMMIT}" |
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.
Well, looks good. In any case this is temporary till we completely remove jenkins.
This PR removes stages related to tests (check static, unit tests and integration tests) to not be duplicated with the Buildkite plugin.
It replaces those stages to run a stage that checks whether or not the PR branch (GIT_BASE_COMMIT) contains the commit were the buildkite branch was merged. If the PR does not contain that changeset, a message is shown to the developer and the Jenkins build fails.
Tested with a PR created before the buildkite branch was merged: #1148
To be tested once it is merged to confirm that it works as expected with old PRs.