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

[2.9] Add build system's values to Drone's targets via build-args #45419

Open
wants to merge 3 commits into
base: release/v2.9
Choose a base branch
from

Conversation

maxsokolovsky
Copy link
Contributor

@maxsokolovsky maxsokolovsky commented May 8, 2024

Issue: #45418

Problem

Currently, Drone doesn't run all the scripts intended to be run on release. Specifically, it doesn't run ci in all its targets. Because of this, images built by Drone and pushed to registries don't run some of the necessary scripts and thus don't have some of the environment variables needed for Rancher at run time.

Solution

Because Drone will soon be removed in favor of GitHub Actions, this commit simply adds the environment variables as build-args inline, instead of fixing the Drone pipeline steps and the ensuing it runs the script populating the environment variables defined by the build system.

Testing

Engineering Testing

Manual Testing

Automated Testing

  • Test types added/modified:
    • Unit
    • Integration (Go Framework)
    • Integration (v2prov Framework)
    • Validation (Go Framework)
    • Other - Explain: EXPLAIN
    • None
    • REMOVE NOT APPLICABLE BULLET POINTS ABOVE
  • If "None" - Reason: EXPLAIN THE REASON
  • If "None" - GH Issue/PR: LINK TO GH ISSUE/PR TO ADD TESTS

Summary: TODO

QA Testing Considerations

Regressions Considerations

TODO

Existing / newly added automated tests that provide evidence there are no regressions:

  • TODO

Currently, Drone doesn't run all the scripts intended to be run on
release. Because of this, images built by Drone and pushed to registries
don't have some of the environment variables needed for Rancher at run
time.

Because Drone will soon be removed in favor of GitHub Actions, this
commit simply adds the environment variables as build-args inline,
instead of fixing the Drone pipeline steps and the scripts it runs.
@maxsokolovsky maxsokolovsky changed the title Add build system's values to Drone's targets via build-args [2.9] Add build system's values to Drone's targets via build-args May 8, 2024
.drone.yml Outdated
@@ -608,6 +616,9 @@ steps:
build_args:
- ARCH=arm64
- VERSION=${DRONE_BRANCH/release\//}-${DRONE_COMMIT}-head
- CATTLE_RANCHER_WEBHOOK_VERSION=104.0.0+up0.5.0-rc8
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than adding the hardcoded values here, can we instead use build_args_from_env and maybe use command: or something similar to source scripts/package-env?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me look into Drone's docs for that. This would be a much better fix - a release captain won't need to update these values then.

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.

None yet

2 participants