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

Run yq in container to prevent local errors due to versions #268

Closed
Dunky13 opened this issue Jan 6, 2021 · 1 comment
Closed

Run yq in container to prevent local errors due to versions #268

Dunky13 opened this issue Jan 6, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Dunky13
Copy link
Contributor

Dunky13 commented Jan 6, 2021

Describe the bug:
When yq is not installed, or version 4+ is installed the yq commands in bin/common.sh fail due to local execution. Moving the yq execution into a container image would resolve this issue

To Reproduce

  1. Have no yq installed
    • . bin/aliases
    • oaz login
    • Observe error message yq: command not found
  2. Have yq@4 installed
    • . bin/aliases
    • oaz login
    • Observe error message unknown command "r" for "yq"

Expected behavior:
Just work, without extra local dependencies

Additional context:
Related to #265 - where suggested solution was to throw error, but that would not suffice.
This issue will be resolved using container images

@Dunky13 Dunky13 added the bug Something isn't working label Jan 6, 2021
Dunky13 pushed a commit that referenced this issue Jan 6, 2021
yq had to be installed locally due to bin/common.sh yq execution through the otomi bridge. By
running the yq commands in a docker container the installation as well as the version are
guaranteed. As yq@4 has breaking changes. Now sticky at yq@3

#268
@Dunky13 Dunky13 self-assigned this Jan 6, 2021
@Dunky13
Copy link
Contributor Author

Dunky13 commented Jan 6, 2021

Dunky13 pushed a commit that referenced this issue Jan 7, 2021
In CI there is no docker(-in-docker) but a local yq is available. So this implementation checks if
there is a local yq and is at correct version (3) if so, use local execution, if yq is not installed
then use docker and the docker image to run it. If neither is installed, exit en throw error

#268
@Dunky13 Dunky13 linked a pull request Jan 7, 2021 that will close this issue
@Dunky13 Dunky13 closed this as completed Jan 8, 2021
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