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

Install and use ginkgo cli at project level #892

Conversation

miguelsorianod
Copy link
Contributor

Currently, in the project the ginkgo cli tool is used by
some Makefile targets of the project and at Go level.

However, the project assumes that the cli tool is installed in the
user's environment. This leads to errors when trying to use
the Makefile targets and the user being confused as to why.

Aside from that, even if the user has the tool in the environment, the
version used by t might be different than the version that is specified
in go.mod, which might lead to errors when running the tool and
different observed behavior between users.

This set of changes ensures that the tools used by the Makefile are the
ones installed by it. This ensures that anyone that uses the project
and runs the ginkgo cli tool using the Makefile targets will use the same
version of the tool.

The tool is now always installed in the bin directory
of the project's path.

Users of the project that want to directly use the installed tool
manually should run it using the binary installed at project
level to ensure that there are no differences in the tool version.

Finally, remove the explicit install of the ginkgo binary in the CI
workflow as it is now automatically installed when running the tests
through the Makefile.

Explicitly set the default Makefile target so the order in which
variables and targets appear in the Makefile does not alter the default
Makefile target being executed
Currently, in the project the ginkgo cli tool is used by
some Makefile targets of the project and at Go level.

However, the project assumes that the cli tool is installed in the
user's environment. This leads to errors when trying to use
the Makefile targets and the user being confused as to why.

Aside from that, even if the user has the tool in the environment, the
version used by t might be different than the version that is specified
in go.mod, which might lead to errors when running the tool and
different observed behavior between users.

This set of changes ensures that the tools used by the Makefile are the
ones installed by it. This ensures that anyone that uses the project
and runs the ginkgo cli tool using the Makefile targets will use the same
version of the tool.

The tool is now always installed in the `bin` directory
of the project's path.

Users of the project that want to directly use the installed tool
manually should run it using the binary installed at project
level to ensure that there are no differences in the tool version.
Remove the explicit install of the `ginkgo` binary in the CI
workflow as it is now automatically installed when running the tests
through the Makefile
@miguelsorianod miguelsorianod force-pushed the install-ginkgocli-atprojectlevel branch from dab3f82 to 92f4fb9 Compare April 8, 2024 10:07
@miguelsorianod miguelsorianod merged commit 9edb954 into openshift-online:main Apr 8, 2024
5 checks passed
@miguelsorianod miguelsorianod deleted the install-ginkgocli-atprojectlevel branch April 8, 2024 10:17
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