Change-Id: Ica5fdc2ea8306483e8597b9c4ea4f40f92b13c24
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279017
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This adds an additional check in the git install_hooks script to see if
the hook is already set as executable before attempting to chmod it. So
if it's already setup manually, or outside of Docker first, and file
write permission hasn't been granted to Docker, it doesn't fail even
though it's already done.
This also adds a new environment variable:
- CANVAS_SKIP_DOCKER_USERMOD: If defined, the Docker image build
disables the inefficient usermod functionality, even if you're running
Linux, the same way it does everywhere else. You would want to use
this if you have solved Docker bind-mounted filesystem permissions
another way.
flag=none
Test Plan:
- On Linux, export CANVAS_SKIP_DOCKER_USERMOD=1;
- ./script/docker_dev_setup.sh
- Verify app containers still run with "docker" user as UID 9999.
- Verify no changes on OSX.
Change-Id: I5bdb4ce21e9a41dec2bb99d4284ac73a067f5899
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256275
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Bryan Petty <bpetty@instructure.com>
Product-Review: Bryan Petty <bpetty@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
This only affects javascript files and only affects things
from the prettier whitelist
This will run slowly if you don't have node_modules installed
locally (e.g., in Docker), but it will gladly attempt to
run things in Docker for you.
This adds a new githook_installer image that will install
the githook whenever a docker-compose up happens in the
repo. It will also install the hook whenever a `yarn`
occurs locally (as a postinstall hook).
This commit should also not fail things. For example
having unused variables is an ESLint error, but it isn't
autofixable. It will log the error, but will otherwise
continue. However, it will make this pretty with prettier
as well as fix any other autofixable ESLint errors.
closes CORE-2118
Test Plan:
- Run `yarn`
- Add some semicolons to something from the whitelist
- git add that file
- git commit and it will strip semicolons
- In a dockerized Canvas:
- docker-compose up
- Add semicolons to a file
- git add that file
- git commit, it will take forever (~60s)
- It should have stripped out semicolons
Change-Id: Id9198aa008808e898f29acb9ed64dd14ff843222
Reviewed-on: https://gerrit.instructure.com/171510
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>