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

build: Add LOCAL_{ADDONS,HARVESTER}_SRC arguments #763

Merged
merged 2 commits into from
Jul 10, 2024

Conversation

tserong
Copy link
Contributor

@tserong tserong commented Jul 5, 2024

Problem:
It's currently annoying to build ISO images from the harvester-installer repo when you want to also include changes from a local harvester and/or addons repo. You have to manually edit Dockerfile.dapper and tweak DAPPER_RUN_ARGS to add something like -v /path/to/local/harvester/repo:/go/src/github.com/harvester/harvester.

Solution:
I've added LOCAL_HARVESTER_SRC and LOCAL_ADDONS_SRC environment variables to the build, which, if set, will automatically inject the correct -v /path/to/local/harvester/repo parameters, so now you can do this:

$ export LOCAL_HARVESTER_SRC=/path/to/local/harvester/repo
$ export LOCAL_ADDONS_SRC=/path/to/local/addons/repo
$ make

I've also done a little minor rewording and made the harvester repo cloning in scripts/build-bundle consistent with what's done in scripts/build.

Related Issue:
N/A

Test plan:
N/A

tserong added 2 commits July 5, 2024 19:16
`/scripts/build` clones the harvester repo to "../harvester", but
`/scripts/build-bundle` was using "/tmp/harvester".  I've updated
the latter to match the former, and also tweaked some of the
messages slightly.

Signed-off-by: Tim Serong <[email protected]>
This makes it really easy to run `make` from the installer repository
and get an ISO built including modifications in a local harvester or
addons repository.  Prior to this, you'd have to manually edit
Dockerfile.dapper to add a bind mount pointing to your other local
source.

Signed-off-by: Tim Serong <[email protected]>
Copy link
Contributor

@ibrokethecloud ibrokethecloud left a comment

Choose a reason for hiding this comment

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

lgtm. thanks.

Copy link
Member

@bk201 bk201 left a comment

Choose a reason for hiding this comment

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

This is useful, I don't need to edit dockerfile.dapper anymore to passthrough the harvester folder. Thanks.

@tserong tserong merged commit 9ea63a0 into harvester:master Jul 10, 2024
6 checks passed
@tserong tserong deleted the wip-add-local-harvester-src branch July 10, 2024 02:59
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.

4 participants