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

The if/else statement in docker does not work properly. #33

Closed
webbertakken opened this issue Oct 20, 2020 · 4 comments
Closed

The if/else statement in docker does not work properly. #33

webbertakken opened this issue Oct 20, 2020 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@webbertakken
Copy link
Member

webbertakken commented Oct 20, 2020

Bug description

The if/else statement in docker does not work properly.

Specifically: editor/Dockerfile:15-21

https://github.com/Unity-CI/docker/blob/566bfdc359d8dfd634f0dc9e32d24b1490a821d4/editor/Dockerfile#L15-L21

How to reproduce

Clone

git clone git@github.com:Unity-CI/docker.git

Checkout main

git checkout main

Build the container with module=base

docker build --build-arg hubImage=unityci/hub:0.2.0 --build-arg baseImage=unityci/base:0.2.0 --build-arg version=2019.2.9f1 --build-arg changeSet=ebce4d76e6e8 --build-arg module=base editor -t editor-2019-2-9f1-base

or module=mac-mono

docker build --build-arg hubImage=unityci/hub:0.2.0 --build-arg baseImage=unityci/base:0.2.0 --build-arg version=2019.2.9f1 --build-arg changeSet=ebce4d76e6e8 --build-arg module=mac-mono editor -t editor-2019-2-9f1-mac-mono

or module=something-invalid

docker build --build-arg hubImage=unityci/hub:0.2.0 --build-arg baseImage=unityci/base:0.2.0 --build-arg version=2019.2.9f1 --build-arg changeSet=ebce4d76e6e8 --build-arg module=invalid editor -t editor-2019-2-9f1-invalid

Expected behavior

The if else is not hard to read, so the intention is correct, but currently not working. If the if else works properly, the rest will start working again and images will start generating.

Additional details

This is currently a blocker for publishing all new images.

@webbertakken webbertakken added the bug Something isn't working label Oct 20, 2020
@GabLeRoux GabLeRoux added the help wanted Extra attention is needed label Oct 20, 2020
@GabLeRoux GabLeRoux added this to the v0.3 milestone Oct 20, 2020
@jonathanperret
Copy link
Contributor

jonathanperret commented Oct 20, 2020

The [[ is a bashism and Ubuntu uses dash to run scripts by default. Switching to the standard [ should fix the issue.

@webbertakken
Copy link
Member Author

I tried that, but I don't think that worked either.

@jonathanperret
Copy link
Contributor

Sorry, [ expects = as an operator, not ==.

@webbertakken
Copy link
Member Author

That, I actually haven't tried :)

GabLeRoux added a commit that referenced this issue Oct 20, 2020
GabLeRoux added a commit that referenced this issue Oct 20, 2020
Fix condition by replacing [[ with [ closes #33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants