Skip to content

Commit

Permalink
fix: add alias jq to gojq (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusz89016 authored Jun 3, 2023
1 parent 9cb1c88 commit c7eaae0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ RUN gosu atlantis bash -l -c " \

# Additional cleanup
RUN rm -rf /tmp/*
# Add alias
RUN echo 'alias jq=gojq' >> ~/.bashrc
# Add 'alias' `jq` to `gojq`
RUN echo -e '#!/bin/bash \nexec gojq "$@"' > /usr/local/bin/jq && chmod +x /usr/local/bin/jq

# Set atlantis login shell to bash
RUN sed -i s#atlantis:/sbin/nologin#atlantis:/bin/bash#g /etc/passwd
Expand Down
9 changes: 6 additions & 3 deletions app/pull-gitlab-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ do
content=$(echo $v | jq -r '.value')
MULTIENV_RESULT+="${name}=${content}",
else
# TODO better logging
# >&2 echo "Not allowed environment variable: $name. Skipped..."
:
# TODO: Atlantis couldn't handle anything printed on stderr - only dynamic variables should be outputted
# >&2 echo "Not allowed environment variable: $name. Skipped..."
fi
done

Expand All @@ -65,7 +66,9 @@ do
echo "$content" > $randomized_name
MULTIENV_RESULT+="${name}=${randomized_name}",
else
# >&2 echo "Not allowed file variable: $name. Skipped..."
:
# TODO: Atlantis couldn't handle anything printed on stderr - only dynamic variables should be outputted
# >&2 echo "Not allowed file variable: $name. Skipped..."
fi
done

Expand Down

0 comments on commit c7eaae0

Please sign in to comment.