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

validate-git fails in local environmnt due to empty COMMIT_RANGE value #3820

Closed
alik42 opened this issue Dec 27, 2022 · 1 comment
Closed

Comments

@alik42
Copy link

alik42 commented Dec 27, 2022

On running make validate-git
On my local mac cloned from the main brunch
Seems the default for the variable at "docker-bake.hcl"
COMMIT_RANGE = ""
Is causing the make command to exit with error:
COMMIT_RANGE required
This is set with correct values in the git actions process, and passes.
But as far as I understand should also be executed and pass in local env.

Solution:
Seems that it can be resolved by setting variable locally or changing the default.
I used export COMMIT_RANGE=HEAD..HEAD to get the latest commit message tested.
But maybe export COMMIT_RANGE=$(git reflog show --no-abbrev --format='%h')..HEAD would be more appropriate.

alik42 added a commit to alik42/distribution that referenced this issue Dec 29, 2022
On running make validate-git
On my local mac cloned from the main brunch
Seems the default for the variable at "docker-bake.hcl"
COMMIT_RANGE = ""
Is causing the make command to exit with error:
COMMIT_RANGE required
This is set with correct values in the git actions process, and pass.
But should also be executed and pass in local env.

Solution:
updating the default in the docker-"bake.hcl" file as naive value of `HEAD..HEAD`
and overriding it with local env values from the "Makefile".

in addition adding the "coverage.txt" file to the git ignore so it will not get checked in.

Signed-off-by: Alik R. <120061088+alik42@users.noreply.github.com>
alik42 added a commit to alik42/distribution that referenced this issue Dec 29, 2022
On running make validate-git
On my local mac cloned from the main brunch
Seems the default for the variable at "docker-bake.hcl"
COMMIT_RANGE = ""
Is causing the make command to exit with error:
COMMIT_RANGE required
This is set with correct values in the git actions process, and pass.
But should also be executed and pass in local env.

Solution:
updating the default in the docker-"bake.hcl" file as naive value of `HEAD..HEAD`
and overriding it with local env values from the "Makefile".

in addition adding the "coverage.txt" file to the git ignore so it will not get checked in.

Signed-off-by: Alik R. <alik.rogotner@gmail.com>
alik42 added a commit to alik42/distribution that referenced this issue Dec 29, 2022
On running make validate-git
On my local mac cloned from the main brunch
Seems the default for the variable at "docker-bake.hcl"
COMMIT_RANGE = ""
Is causing the make command to exit with error:
COMMIT_RANGE required
This is set with correct values in the git actions process, and pass.
But should also be executed and pass in local env.

Solution:
updating the default in the docker-"bake.hcl" file as naive value of `HEAD..HEAD`
and overriding it with local env values from the "Makefile".

in addition adding the "coverage.txt" file to the git ignore so it will not get checked in.

Signed-off-by: alik42 <alik.rogotner@gmail.com>
@milosgajdos
Copy link
Member

Closing as agreed in #4094

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

No branches or pull requests

2 participants