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

Unable to override README_TEMPLATE_REPO_URL and README_ALLOWLIST_ORGS #387

Closed
irl opened this issue Sep 24, 2024 · 2 comments
Closed

Unable to override README_TEMPLATE_REPO_URL and README_ALLOWLIST_ORGS #387

irl opened this issue Sep 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@irl
Copy link

irl commented Sep 24, 2024

Describe the Bug

These variables are defined with := rather than ?= which means it's not possible to override these variables, they will always be overwritten by the values set in the build-harness module Makfile. We use GitLab and need to override these variables to be able to load the template from GitLab and to be able to allowlist our organisation. Without these changes, it is not possible for us to use the README module without forking build-harness to add our changes.

Expected Behavior

The variables do not override values set previously.

Steps to Reproduce

Add to the Makefile before including the build-harness bootstrap:

export README_TEMPLATE_REPO_URL := https://gitlab.com/$(README_TEMPLATE_REPO_ORG)/$(README_TEMPLATE_REPO)/-/raw/$(README_TEMPLATE_REPO_REF)/$(README_TEMPLATE_REPO_PATH)

Notice how using the README module, this is overwritten to the original GitHub version.

Screenshots

No response

Environment

No response

Additional Context

No response

@irl irl added the bug Something isn't working label Sep 24, 2024
Copy link

Thank you for reporting the issue! If you haven't already joined our slack community, then we invite you to do so.

This is a great place to get help and ask questions from our AMAZING community.

Slack Community

@irl
Copy link
Author

irl commented Oct 15, 2024

It still works to set README_TEMPLATE_FILE and this will prevent attempts to fetch the remote template. If you have issues with dirname outputting errors it may be because no github_repo line is present in your README.yaml, for example because you use GitLab instead. In this case, setting README_TEMPLATE_REPO_ORG will mean that it doesn't attempt to discover that from the README.yaml. You can set it to any value for as long as README_TEMPLATE_FILE exists, it will be ignored.

@irl irl closed this as completed Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant