Skip to content

Commit 9747701

Browse files
kiblikMaffooch
andauthored
feat(bash-script): Drop all dc- scripts (#11649)
Co-authored-by: Cody Maffucci <46459665+Maffooch@users.noreply.github.com>
1 parent 420bf66 commit 9747701

File tree

16 files changed

+59
-143
lines changed

16 files changed

+59
-143
lines changed

.github/workflows/fetch-oas.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
docker images
3434
3535
- name: Start Dojo
36-
run: docker compose up --no-deps -d postgres nginx uwsgi
36+
run: docker compose up -d postgres nginx uwsgi
3737
env:
3838
DJANGO_VERSION: ${{ env.release_version }}-alpine
3939
NGINX_VERSION: ${{ env.release_version }}-alpine

.github/workflows/integration-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,21 @@ jobs:
6363
run: ln -s docker-compose.override.integration_tests.yml docker-compose.override.yml
6464

6565
- name: Start Dojo
66-
run: docker compose up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi redis
66+
run: docker compose up -d postgres nginx celerybeat celeryworker mailhog uwsgi redis
6767
env:
6868
DJANGO_VERSION: ${{ matrix.os }}
6969
NGINX_VERSION: ${{ matrix.os }}
7070

7171
- name: Initialize
7272
timeout-minutes: 10
73-
run: docker compose up --no-deps --exit-code-from initializer initializer
73+
run: docker compose up --exit-code-from initializer initializer
7474
env:
7575
DJANGO_VERSION: ${{ matrix.os }}
7676
NGINX_VERSION: ${{ matrix.os }}
7777

7878
- name: Integration tests
7979
timeout-minutes: 10
80-
run: docker compose up --no-deps --exit-code-from integration-tests integration-tests
80+
run: docker compose up --exit-code-from integration-tests integration-tests
8181
env:
8282
DD_INTEGRATION_TEST_FILENAME: ${{ matrix.test-case }}
8383
INTEGRATION_TESTS_VERSION: debian

.github/workflows/rest-framework-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
# no celery or initializer needed for unit tests
4545
- name: Unit tests
4646
timeout-minutes: 10
47-
run: docker compose up --no-deps --exit-code-from uwsgi uwsgi
47+
run: docker compose up --exit-code-from uwsgi uwsgi
4848
env:
4949
DJANGO_VERSION: ${{ matrix.os }}
5050

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,15 @@ docker-compose features and flags. You can run Compose V2 by replacing the hyphe
5050
git clone https://github.com/DefectDojo/django-DefectDojo
5151
cd django-DefectDojo
5252

53+
# Check if your installed toolkit is compatible
54+
./docker/docker-compose-check.sh
55+
5356
# Building Docker images
54-
./dc-build.sh
57+
docker compose build
5558

5659
# Run the application (for other profiles besides postgres-redis see
5760
# https://github.com/DefectDojo/django-DefectDojo/blob/dev/readme-docs/DOCKER.md)
58-
./dc-up-d.sh postgres-redis
61+
docker compose up -d
5962

6063
# Obtain admin credentials. The initializer can take up to 3 minutes to run.
6164
# Use docker compose logs -f initializer to track its progress.
@@ -64,17 +67,13 @@ docker compose logs initializer | grep "Admin password:"
6467

6568
## For Docker Compose V1
6669

67-
You can run Compose V1 by editing the files below to add the hyphen (-) between `docker compose`.
70+
You can run Compose V1 by calling `docker-compose` (by adding the hyphen (-) between `docker compose`).
71+
72+
Following commands are using original version so you might need to adjust them:
6873
```sh
69-
dc-build.sh
70-
dc-down.sh
71-
dc-stop.sh
72-
dc-unittest.sh
73-
dc-up-d.sh
74-
dc-up.sh
75-
docker/docker-compose-check.sh
76-
docker/entrypoint-initializer.sh
77-
docker/setEnv.sh
74+
docker/docker-compose-check.sh
75+
docker/entrypoint-initializer.sh
76+
docker/setEnv.sh
7877
```
7978

8079
Navigate to `http://localhost:8080` to see your new instance!

dc-build.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

dc-down.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

dc-stop.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

dc-up-d.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

dc-up.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/content/en/open_source/contributing/how-to-write-a-parser.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ $ docker compose exec uwsgi bash -c 'python manage.py test unittests.tools.<your
295295
or like this:
296296

297297
{{< highlight bash >}}
298-
$ ./dc-unittest.sh --test-case unittests.tools.<your_unittest_py_file>.<main_class_name>
298+
$ ./run-unittest.sh --test-case unittests.tools.<your_unittest_py_file>.<main_class_name>
299299
{{< /highlight >}}
300300

301301
Example for the blackduck hub parser:
@@ -307,7 +307,7 @@ $ docker compose exec uwsgi bash -c 'python manage.py test unittests.tools.test_
307307
or like this:
308308

309309
{{< highlight bash >}}
310-
$ ./dc-unittest.sh --test-case unittests.tools.test_blackduck_csv_parser.TestBlackduckHubParser
310+
$ ./run-unittest.sh --test-case unittests.tools.test_blackduck_csv_parser.TestBlackduckHubParser
311311
{{< /highlight >}}
312312

313313
If you want to run all unit tests, simply run `$ docker-compose exec uwsgi bash -c 'python manage.py test unittests -v2'`

0 commit comments

Comments
 (0)