Skip to content

Conversation

@mrodm
Copy link
Contributor

@mrodm mrodm commented Feb 15, 2023

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.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 15, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-02-20T09:08:39.923+0000

  • Duration: 2 min 14 sec

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@mrodm mrodm marked this pull request as ready for review February 16, 2023 14:38
@mrodm mrodm requested a review from a team February 16, 2023 14:38
@mrodm mrodm self-assigned this Feb 16, 2023
@mrodm mrodm marked this pull request as draft February 16, 2023 14:44
@mrodm mrodm force-pushed the delete_stages_jenkinsfile branch from b51546e to 43560e1 Compare February 16, 2023 15:25
@mrodm mrodm force-pushed the delete_stages_jenkinsfile branch from 088bd96 to cb5cf39 Compare February 16, 2023 15:58
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"
Copy link
Contributor Author

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}"
Copy link
Contributor Author

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

Copy link
Member

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.

@mrodm mrodm marked this pull request as ready for review February 16, 2023 18:30
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}"
Copy link
Member

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.

@mrodm mrodm merged commit 083d4f1 into elastic:main Feb 20, 2023
@mrodm mrodm deleted the delete_stages_jenkinsfile branch February 20, 2023 09:28
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 this pull request may close these issues.

3 participants