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

Add Independent Agent alternate step in pipeline #286

Closed
wants to merge 7 commits into from

Conversation

dwhyrock
Copy link
Collaborator

@dwhyrock dwhyrock commented Jul 9, 2024

This PR adds an alternate step in the elastic-stack-installers that the Independent Agent Release will use in order to get only the Elastic Agent windows installer (.msi) built.

The new pipeline step uses a new script that does the following:

  • Retrieve the MSI artifacts from the Build step
  • Moves the MSI artifacts to a new directory
  • Creates a .sha512 file for the MSI file
  • Saves the MSI and .sha512 artifacts using Buildkite's built-in upload functionality
  • Sets metadata in the calling pipeline if the TRIGGER_JOB_ID is set
    • The calling pipeline will then use this metadata to download the saved artifacts

This PR incorporates the changes from these two PRs, which should be closed in favor of this PR:

I tested this PR with this unified-release PR, and verified that the Independent Agent Staging pipeline successfully triggers this new pipeline step, and is able to download the MSI and .sha512 artifacts after this triggered pipeline finishes running.

Example of successful execution:

@dwhyrock dwhyrock marked this pull request as ready for review July 10, 2024 20:40
@dwhyrock dwhyrock requested review from a team as code owners July 10, 2024 20:40
key: "independent-agent-staging"
if: |
// This should only run when triggered from Independent Agent Staging
(build.env("BUILDKITE_TRIGGERED_FROM_BUILD_PIPELINE_SLUG") == "independent-agent-release-staging") || ( build.branch == 'pull/286/merge')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will remove the last clause about the PR branch once this PR is reviewed and ready to merge. Until then, we'll still use it for testing the other work related to the Windows MSI file.

@dwhyrock dwhyrock added backport used for backport PRs and removed backport used for backport PRs labels Jul 10, 2024
amitkanfer
amitkanfer previously approved these changes Jul 10, 2024
Copy link
Contributor

@amitkanfer amitkanfer left a comment

Choose a reason for hiding this comment

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

Someone else should probably review my original C# changes.. but i confirm they are intact.
I will follow up with some comments on the code for future readers

@dwhyrock dwhyrock requested review from dliappis and DaveSys911 July 11, 2024 14:53
@dwhyrock
Copy link
Collaborator Author

Closing in favor of a PR that is not from a fork: #287

@dwhyrock dwhyrock closed this Jul 11, 2024
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.

2 participants