aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-12-14 23:29:00 -0800
committerGravatar MarkKoz <[email protected]>2019-12-14 23:39:14 -0800
commit93dab0fa061fdfcf3fdb59210a220ae01c3b4a2e (patch)
tree13273836b8845ea56121dfe34e5ad661b497255e
parentUpdate the Python version in README (diff)
Use bash instead of ash
Forgot to do this after switching to Debian.
-rw-r--r--README.md6
-rw-r--r--azure-pipelines.yml10
-rwxr-xr-xscripts/dev.sh10
3 files changed, 13 insertions, 13 deletions
diff --git a/README.md b/README.md
index 383d070..f1fcac5 100644
--- a/README.md
+++ b/README.md
@@ -122,17 +122,17 @@ The HTML will output to `./htmlcov/` by default
### The `devsh` Helper Script
-This script starts an `ash` shell inside the venv Docker container and attaches to it. Unlike the production image, the venv image that is built by this script contains dev dependencies too. The project directory is mounted inside the container so any filesystem changes made inside the container affect the actual local project.
+This script starts an `bash` shell inside the venv Docker container and attaches to it. Unlike the production image, the venv image that is built by this script contains dev dependencies too. The project directory is mounted inside the container so any filesystem changes made inside the container affect the actual local project.
#### Usage
```
-pipenv run devsh [--build [--clean]] [ash_args ...]
+pipenv run devsh [--build [--clean]] [bash_args ...]
```
* `--build` Build the venv Docker image
* `--clean` Clean up dangling Docker images (only works if `--build` precedes it)
-* `ash_args` Arguments to pass to `/bin/ash` (for example `-c "echo hello"`). An interactive shell is launched if no arguments are given
+* `bash_args` Arguments to pass to `/bin/bash` (for example `-c "echo hello"`). An interactive shell is launched if no arguments are given
#### Invoking NsJail
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 2fa8a1a..f86b388 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -56,12 +56,12 @@ jobs:
-e ENV="${PWD}/scripts/.profile" \
--volume "${PWD}":"${PWD}" \
--workdir "${PWD}"\
- --entrypoint /bin/ash \
+ --entrypoint /bin/bash \
pythondiscord/snekbox-venv:dev
displayName: 'Start Container'
- script: |
- docker exec snekbox_test /bin/ash -c \
+ docker exec snekbox_test /bin/bash -c \
'pipenv run lint --format junit-xml --output-file test-lint.xml'
displayName: 'Run Linter'
@@ -77,7 +77,7 @@ jobs:
displayName: 'Disable Swap Memory'
- script: |
- docker exec snekbox_test /bin/ash -c \
+ docker exec snekbox_test /bin/bash -c \
'pipenv run coverage run -m xmlrunner'
displayName: 'Run Unit Tests'
@@ -90,8 +90,8 @@ jobs:
# Run report too because the XML report doesn't output to stdout.
- script: |
- docker exec snekbox_test /bin/ash -c \
- 'pipenv run /bin/ash -c "coverage report && coverage xml"'
+ docker exec snekbox_test /bin/bash -c \
+ 'pipenv run /bin/bash -c "coverage report && coverage xml"'
displayName: 'Generate Coverage Report'
- task: PublishCodeCoverageResults@1
diff --git a/scripts/dev.sh b/scripts/dev.sh
index 8f5b24f..6aeb1de 100755
--- a/scripts/dev.sh
+++ b/scripts/dev.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
# Sets up a development environment and runs a shell in a docker container.
-# Usage: dev.sh [--build [--clean]] [ash_args ...]
+# Usage: dev.sh [--build [--clean]] [bash_args ...]
if [ "$1" = "--build" ]; then
shift
@@ -42,15 +42,15 @@ docker run \
--hostname pdsnk-dev \
-e PYTHONDONTWRITEBYTECODE=1 \
-e PIPENV_PIPFILE="/snekbox/Pipfile" \
- -e ENV="${PWD}/scripts/.profile" \
+ -e BASH_ENV="${PWD}/scripts/.profile" \
--volume "${PWD}":"${PWD}" \
--workdir "${PWD}"\
- --entrypoint /bin/ash \
+ --entrypoint /bin/bash \
pythondiscord/snekbox-venv:dev \
>/dev/null \
# Execute the given command(s)
-docker exec -it snekbox_test /bin/ash "$@"
+docker exec -it snekbox_test /bin/bash --rcfile "${PWD}/scripts/.profile" "$@"
# Fix ownership of coverage file
# BusyBox doesn't support --reference for chown
@@ -58,7 +58,7 @@ docker exec \
-it \
-e CWD="${PWD}" \
snekbox_test \
- /bin/ash \
+ /bin/bash \
-c 'chown "$(stat -c "%u:%g" "${CWD}")" "${CWD}/.coverage"'
docker rm -f snekbox_test >/dev/null # Stop and remove the container