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

Release: Merge release into master from: release/2.37.0 #10678

Merged
merged 127 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
5d0c827
Update versions in application files
Jul 1, 2024
cb37e7a
Update helm lock file
Jul 1, 2024
f3b6aa1
Merge pull request #10485 from DefectDojo/master-into-dev/2.36.0-2.37…
Maffooch Jul 1, 2024
b43d8f0
Update Helm release redis from 19.5.5 to ~19.6.0 (helm/defectdojo/Cha…
renovate[bot] Jul 1, 2024
569c826
Bump python-gitlab from 4.6.0 to 4.7.0 (#10469)
dependabot[bot] Jul 1, 2024
be7051a
Update dependency ruff from 0.4.10 to v0.5.0 (requirements-lint.txt) …
renovate[bot] Jul 1, 2024
dff84bd
Bump boto3 from 1.34.135 to 1.34.136 (#10480)
dependabot[bot] Jul 1, 2024
039f3cb
Bump django-test-migrations from 1.3.0 to 1.4.0 (#10481)
dependabot[bot] Jul 1, 2024
ed1551a
Bump openpyxl from 3.1.4 to 3.1.5 (#10478)
dependabot[bot] Jul 1, 2024
aae8b00
Ruff: add and fix TID (#10113)
kiblik Jul 2, 2024
36d6700
Ruff: add and fix PIE (#10090)
kiblik Jul 2, 2024
1502a3c
Revert "Shuffle tests (#10335)" (#10495)
Maffooch Jul 2, 2024
24c989a
Update dependency postcss from 8.4.38 to v8.4.39 (docs/package.json) …
renovate[bot] Jul 2, 2024
f90805c
Bump pillow from 10.3.0 to 10.4.0 (#10482)
dependabot[bot] Jul 2, 2024
4a5d2a6
Bump drf-spectacular-sidecar from 2024.6.1 to 2024.7.1 (#10479)
dependabot[bot] Jul 2, 2024
d52044e
Bump asteval from 0.9.33 to 1.0.0 (#10488)
dependabot[bot] Jul 2, 2024
39d6963
Bump boto3 from 1.34.136 to 1.34.137 (#10489)
dependabot[bot] Jul 2, 2024
6fdd46d
Ruff: add and fix Q (except Q000) (#10094)
kiblik Jul 2, 2024
3b14123
Feat(psql): Use psycopg3 (#10348)
kiblik Jul 3, 2024
8b9f9a4
extend AWS prowler v3 parser (#10372)
kagahd Jul 3, 2024
590b741
Bump boto3 from 1.34.137 to 1.34.138 (#10508)
dependabot[bot] Jul 3, 2024
a309c71
Ruff: add and fix COM (#10086)
kiblik Jul 3, 2024
74b55e8
Bump packageurl-python from 0.15.1 to 0.15.2 (#10516)
dependabot[bot] Jul 5, 2024
bf8e4e7
Bump psycopg[binary] from 3.1.19 to 3.2.1 (#10517)
dependabot[bot] Jul 5, 2024
a626265
Bump boto3 from 1.34.138 to 1.34.139 (#10518)
dependabot[bot] Jul 5, 2024
fe620a9
Bump django-debug-toolbar from 4.4.2 to 4.4.4 (#10520)
dependabot[bot] Jul 5, 2024
9e2f02b
Update dependency ruff from 0.5.0 to v0.5.1 (requirements-lint.txt) (…
renovate[bot] Jul 5, 2024
70c32fe
Bump humanize from 4.9.0 to 4.10.0 (#10525)
dependabot[bot] Jul 8, 2024
da3fb12
Bump django-split-settings from 1.3.1 to 1.3.2 (#10526)
dependabot[bot] Jul 8, 2024
d0f3d30
Bump boto3 from 1.34.139 to 1.34.140 (#10528)
dependabot[bot] Jul 8, 2024
63cbaab
Bump openapitools/openapi-generator-cli from v7.6.0 to v7.7.0 (#10531)
dependabot[bot] Jul 8, 2024
002a0af
Ruff: add and fix G1 and G2 (#10088)
kiblik Jul 8, 2024
fe6f9e0
Update versions in application files
Jul 8, 2024
f0a291b
Merge branch 'dev' into master-into-dev/2.36.1-2.37.0-dev
blakeaowens Jul 8, 2024
5ad97d7
Update helm lock file
Jul 8, 2024
66302c5
Ruff fix
blakeaowens Jul 8, 2024
42ef652
Fix ruff
blakeaowens Jul 8, 2024
d7c6d9c
Bump django-debug-toolbar from 4.4.4 to 4.4.5 (#10527)
dependabot[bot] Jul 8, 2024
f8cff1b
Merge pull request #10538 from DefectDojo/master-into-dev/2.36.1-2.37…
blakeaowens Jul 8, 2024
dda00cb
Update versions in application files
Jul 9, 2024
e6d1071
Merge branch 'dev' into master-into-dev/2.36.2-2.37.0-dev
Maffooch Jul 9, 2024
bee37de
Update helm lock file
Jul 9, 2024
0a51a29
Merge pull request #10548 from DefectDojo/master-into-dev/2.36.2-2.37…
Maffooch Jul 9, 2024
3c3a275
Bump boto3 from 1.34.140 to 1.34.141 (#10542)
dependabot[bot] Jul 9, 2024
17a3673
Bump packageurl-python from 0.15.2 to 0.15.3 (#10541)
dependabot[bot] Jul 9, 2024
b7de5eb
Bump boto3 from 1.34.141 to 1.34.142 (#10551)
dependabot[bot] Jul 10, 2024
e5adc22
Bump django-debug-toolbar from 4.4.5 to 4.4.6 (#10557)
dependabot[bot] Jul 11, 2024
a6b8c86
Bump boto3 from 1.34.142 to 1.34.143 (#10558)
dependabot[bot] Jul 11, 2024
68ff68d
Bump djangorestframework from 3.14.0 to 3.15.2 (#10431)
dependabot[bot] Jul 11, 2024
e2b47cd
Bump asteval from 1.0.0 to 1.0.1 (#10561)
dependabot[bot] Jul 12, 2024
3462db0
Bump coverage from 7.5.4 to 7.6.0 (#10560)
dependabot[bot] Jul 12, 2024
5730df2
fix(deps): build python psycopg3 dependency instead of use the pre-bu…
gietschess Jul 12, 2024
cdbb35a
Fix(django): Upgrade of 4.2 (#10553)
kiblik Jul 12, 2024
df280a6
Ruff: Add and fix Q000 (#10095)
kiblik Jul 12, 2024
4edde4d
fix: dockerfile warnings (#10505)
fcecagno Jul 12, 2024
ca07945
Deprecate Python-jose and migrate okta to python_social_auth (#10117)
manuel-sommer Jul 13, 2024
da12c88
Bump social-auth-app-django from 5.4.1 to 5.4.2 (#10568)
dependabot[bot] Jul 15, 2024
3cbf996
Bump packageurl-python from 0.15.3 to 0.15.4 (#10570)
dependabot[bot] Jul 15, 2024
4e7a831
Bump boto3 from 1.34.143 to 1.34.144 (#10569)
dependabot[bot] Jul 15, 2024
a62ea5d
Bump ruff from 0.5.1 to 0.5.2 (#10567)
dependabot[bot] Jul 15, 2024
5b17b99
Merge branch 'dev' into master-into-dev/2.36.3-2.37.0-dev
Maffooch Jul 15, 2024
d73a0e0
Update helm lock file
Jul 15, 2024
db72eef
Correct ruff
Maffooch Jul 15, 2024
0a05768
update settings SHA
Maffooch Jul 15, 2024
f939a0d
Merge pull request #10573 from DefectDojo/master-into-dev/2.36.3-2.37…
Maffooch Jul 15, 2024
0eca87c
Bump justgage from 1.6.1 to 1.7.0 in /components (#10574)
dependabot[bot] Jul 16, 2024
a5cf746
chore(deps): update gcr.io/cloudsql-docker/gce-proxy docker tag from …
renovate[bot] Jul 17, 2024
cce8d10
Bump fontawesomefree from 6.5.1 to 6.6.0 (#10578)
dependabot[bot] Jul 17, 2024
b0ac035
Bump python-gitlab from 4.7.0 to 4.8.0 (#10580)
dependabot[bot] Jul 17, 2024
89134b2
Bump vulners from 2.1.7 to 2.2.0 (#10579)
dependabot[bot] Jul 18, 2024
15863fa
Bump boto3 from 1.34.144 to 1.34.145 (#10587)
dependabot[bot] Jul 19, 2024
93268fd
Bump ruff from 0.5.2 to 0.5.3 (#10588)
dependabot[bot] Jul 19, 2024
f3e904b
Update versions in application files
Jul 22, 2024
37d04e3
Merge branch 'dev' into master-into-dev/2.36.4-2.37.0-dev
Maffooch Jul 22, 2024
8787d8e
Update helm lock file
Jul 22, 2024
0e86398
Fix ruff
Maffooch Jul 22, 2024
d2d2ca9
Merge pull request #10604 from DefectDojo/master-into-dev/2.36.4-2.37…
Maffooch Jul 22, 2024
57f9721
Bump ruff from 0.5.3 to 0.5.4 (#10600)
dependabot[bot] Jul 23, 2024
fdcf8b8
Bump cryptography from 42.0.8 to 43.0.0 (#10599)
dependabot[bot] Jul 23, 2024
3afee7a
Bump django-crispy-forms from 2.2 to 2.3 (#10601)
dependabot[bot] Jul 23, 2024
dc2cd8d
Bump boto3 from 1.34.145 to 1.34.147 (#10621)
dependabot[bot] Jul 24, 2024
d6e6a22
Update postgres:16.3-alpine Docker digest from 16.3 to 16.3-alpine (d…
renovate[bot] Jul 24, 2024
8dea831
Update versions in application files
Jul 24, 2024
63f3923
Merge branch 'dev' into master-into-dev/2.36.5-2.37.0-dev
Maffooch Jul 24, 2024
f9b9ed1
Update helm lock file
Jul 24, 2024
d99d605
Merge pull request #10628 from DefectDojo/master-into-dev/2.36.5-2.37…
Maffooch Jul 24, 2024
09bc420
Update nginx/nginx-prometheus-exporter Docker tag from 1.2.0 to v1.3.…
renovate[bot] Jul 24, 2024
5313153
Update dependency postcss from 8.4.39 to v8.4.40 (docs/package.json) …
renovate[bot] Jul 24, 2024
2714b3b
Update redis:7.2.5-alpine Docker digest from 7.2.5 to 7.2.5-alpine (d…
renovate[bot] Jul 24, 2024
c38c0c1
feat(initContainer): Tune start-up process (#10454)
kiblik Jul 25, 2024
88409c6
Bump packageurl-python from 0.15.4 to 0.15.6 (#10633)
dependabot[bot] Jul 25, 2024
f4d0ab0
Bump boto3 from 1.34.147 to 1.34.148 (#10632)
dependabot[bot] Jul 25, 2024
2b493dc
Ruff: add and fix T20 (#10091)
kiblik Jul 25, 2024
422f27b
Bump boto3 from 1.34.148 to 1.34.149 (#10634)
dependabot[bot] Jul 26, 2024
2a80d43
Bump ruff from 0.5.4 to 0.5.5 (#10635)
dependabot[bot] Jul 26, 2024
4b60cef
Bump nginx from `a45ee5d` to `208b70e` (#10643)
dependabot[bot] Jul 29, 2024
0fd5be0
Update versions in application files
Jul 29, 2024
8695edb
Update versions in application files
Jul 29, 2024
8404763
Merge pull request #10649 from DefectDojo/master-into-bugfix/2.36.6-2…
Maffooch Jul 29, 2024
b1801db
Merge branch 'dev' into master-into-dev/2.36.6-2.37.0-dev
Maffooch Jul 29, 2024
322f4b5
Update helm lock file
Jul 29, 2024
11171d8
Fixing ruff
Maffooch Jul 29, 2024
afa58cf
Merge pull request #10648 from DefectDojo/master-into-dev/2.36.6-2.37…
Maffooch Jul 29, 2024
19bab59
remove defusedxml in favor of lxml (#9840)
manuel-sommer Jul 29, 2024
fcf6656
Bump boto3 from 1.34.149 to 1.34.150 (#10653)
dependabot[bot] Jul 30, 2024
df2d0d7
Bump boto3 from 1.34.150 to 1.34.151 (#10658)
dependabot[bot] Jul 31, 2024
7315383
Bump redis from 5.0.7 to 5.0.8 (#10659)
dependabot[bot] Jul 31, 2024
1fb5e9e
:bug: fix Bearer CLI missing Scan Type (#10654)
manuel-sommer Aug 1, 2024
22937ba
Groups/users labels text (#10663)
dogboat Aug 1, 2024
32263ac
remove coverage from requirements.txt (#10565)
manuel-sommer Aug 1, 2024
6d1bd43
clickable product metrics - redirect to findings with severity filter…
KJana12 Aug 1, 2024
6f9a1b8
Bump boto3 from 1.34.151 to 1.34.152 (#10669)
dependabot[bot] Aug 2, 2024
bc68a93
Bump pyjwt from 2.8.0 to 2.9.0 (#10670)
dependabot[bot] Aug 2, 2024
97c47c8
Bump asteval from 1.0.1 to 1.0.2 (#10671)
dependabot[bot] Aug 2, 2024
a004bea
report-builder-sort-fixes Fix report builder finding and endpoints wi…
dogboat Aug 2, 2024
42dabca
Adding test to check for invalid parser names (#10656)
cneill Aug 2, 2024
0ef069d
Feature addition: Wizcli Parser (#10603)
OsamaMahmood Aug 2, 2024
91b34af
New Parser: Kiuwan SCA (#10522)
mwager Aug 2, 2024
c06a180
fix(multiselectfield): Use original repo (#10420)
kiblik Aug 2, 2024
52b4116
Add new parser - Rapplex (#10202)
AlperenY-cs Aug 2, 2024
d5f5e79
Update dependency autoprefixer from 10.4.19 to v10.4.20 (docs/package…
renovate[bot] Aug 3, 2024
e2f4445
Remove MySQL and RabbitMQ (#10661)
Maffooch Aug 3, 2024
dc9fc50
Merge branch 'dev' into bugfix
Maffooch Aug 5, 2024
d443d07
Correct ruff
Maffooch Aug 5, 2024
3fd43db
Update parser module test
Maffooch Aug 5, 2024
3a25728
Merge pull request #10677 from DefectDojo/bugfix
Maffooch Aug 5, 2024
3f20b29
Update versions in application files
Aug 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
"baseBranches": ["dev"],
"rebaseWhen": "conflicted",
"ignorePaths": ["requirements.txt", "requirements-lint.txt", "components/package.json", "components/package-lock.json", "dojo/components/yarn.lock", "dojo/components/package.json", "Dockerfile**"],
"ignoreDeps": [
"mysql",
"rabbitmq"
],
"ignoreDeps": [],
"packageRules": [{
"packagePatterns": ["*"],
"commitMessageExtra": "from {{currentVersion}} to {{#if isMajor}}v{{{newMajor}}}{{else}}{{#if isSingleVersion}}v{{{toVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fetch-oas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
docker images

- name: Start Dojo
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env up --no-deps -d postgres nginx uwsgi
run: docker compose up --no-deps -d postgres nginx uwsgi
env:
DJANGO_VERSION: ${{ env.release_version }}-alpine
NGINX_VERSION: ${{ env.release_version }}-alpine
Expand All @@ -44,11 +44,11 @@ jobs:

- name: Logs
if: always()
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env logs --tail="2500"
run: docker compose logs --tail="2500"

- name: Shutdown
if: always()
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env down
run: docker compose down

- name: Upload oas.${{ matrix.file-type }} as artifact
uses: actions/upload-artifact@v3
Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
"tests/tool_config.py",
"openapi-validatator",
]
profile: ["postgres-rabbitmq", "postgres-redis"]
os: [alpine, debian]
fail-fast: false

Expand All @@ -59,39 +58,30 @@ jobs:
- name: Set integration-test mode
run: ln -s docker-compose.override.integration_tests.yml docker-compose.override.yml

# phased startup with PostgreSQL and RabbitMQ so we can use the exit code from integrationtest container
- name: Start Dojo PostgreSQL + RabbitMQ
if: matrix.profile == 'postgres-rabbitmq'
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi rabbitmq
env:
DJANGO_VERSION: ${{ matrix.os }}
NGINX_VERSION: ${{ matrix.os }}

- name: Start Dojo PostgreSQL + Redis
if: matrix.profile == 'postgres-redis'
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi redis
- name: Start Dojo
run: docker compose up --no-deps -d postgres nginx celerybeat celeryworker mailhog uwsgi redis
env:
DJANGO_VERSION: ${{ matrix.os }}
NGINX_VERSION: ${{ matrix.os }}

- name: Initialize
timeout-minutes: 10
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env up --no-deps --exit-code-from initializer initializer
run: docker compose up --no-deps --exit-code-from initializer initializer
env:
DJANGO_VERSION: ${{ matrix.os }}
NGINX_VERSION: ${{ matrix.os }}

- name: Integration tests
timeout-minutes: 10
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env up --no-deps --exit-code-from integration-tests integration-tests
run: docker compose up --no-deps --exit-code-from integration-tests integration-tests
env:
DD_INTEGRATION_TEST_FILENAME: ${{ matrix.test-case }}
INTEGRATION_TESTS_VERSION: debian

- name: Logs
if: always()
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env logs --tail="2500"
run: docker compose logs --tail="2500"

- name: Shutdown
if: always()
run: docker compose --profile ${{ matrix.profile }} --env-file ./docker/environments/${{ matrix.profile }}.env down
run: docker compose down
33 changes: 0 additions & 33 deletions .github/workflows/k8s-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,14 @@ on:

env:
DD_HOSTNAME: defectdojo.default.minikube.local
HELM_RABBIT_BROKER_SETTINGS: " \
--set redis.enabled=false \
--set rabbitmq.enabled=true \
--set celery.broker=rabbitmq \
--set createRabbitMqSecret=true \
"
HELM_REDIS_BROKER_SETTINGS: " \
--set redis.enabled=true \
--set rabbitmq.enabled=false \
--set celery.broker=redis \
--set createRedisSecret=true \
"
HELM_MYSQL_DATABASE_SETTINGS: " \
--set database=mysql \
--set postgresql.enabled=false \
--set mysql.enabled=true \
--set createMysqlSecret=true \
"
HELM_PG_DATABASE_SETTINGS: " \
--set database=postgresql \
--set postgresql.enabled=true \
--set mysql.enabled=false \
--set createPostgresqlSecret=true \
"
jobs:
Expand All @@ -44,23 +30,6 @@ jobs:
brokers: redis
k8s: 'v1.26.11'
os: debian
- databases: mysql
brokers: rabbit
k8s: 'v1.26.11'
os: debian
- databases: pgsql
brokers: rabbit
k8s: 'v1.29.2'
os: debian
- databases: mysql
brokers: redis
k8s: 'v1.29.2'
os: debian
- databases: pgsql
brokers: rabbit
k8s: 'v1.29.2'
os: alpine

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -99,9 +68,7 @@ jobs:
id: set
run: |-
echo "pgsql=${{ env.HELM_PG_DATABASE_SETTINGS }}" >> $GITHUB_ENV
echo "mysql=${{ env.HELM_MYSQL_DATABASE_SETTINGS }}" >> $GITHUB_ENV
echo "redis=${{ env.HELM_REDIS_BROKER_SETTINGS }}" >> $GITHUB_ENV
echo "rabbit=${{ env.HELM_RABBIT_BROKER_SETTINGS }}" >> $GITHUB_ENV

- name: Deploying Djano application with ${{ matrix.databases }} ${{ matrix.brokers }}
timeout-minutes: 10
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-1-create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ jobs:

- name: Update version numbers in key files
run: |
sed -ri "s/__version__ = '.*'/__version__ = '${{ github.event.inputs.release_number }}'/" dojo/__init__.py
sed -ri "s/\"version\": \".*\"/\"version\": \"${{ github.event.inputs.release_number }}\"/" components/package.json
sed -ri "s/appVersion: \".*\"/appVersion: \"${{ github.event.inputs.release_number }}\"/" helm/defectdojo/Chart.yaml
sed -ri 's/__version__ = ".*"/__version__ = "${{ github.event.inputs.release_number }}"/' dojo/__init__.py
sed -ri 's/"version": ".*"/"version": "${{ github.event.inputs.release_number }}"/' components/package.json
sed -ri 's/appVersion: ".*"/appVersion: "${{ github.event.inputs.release_number }}"/' helm/defectdojo/Chart.yaml

if grep "\-dev" helm/defectdojo/Chart.yaml; then
echo "x.y.z-dev found in Chart.yaml, probably releasing a new minor version"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-3-master-into-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:

- name: Update version numbers in key files
run: |
sed -ri "s/__version__ = '.*'/__version__ = '${{ github.event.inputs.release_number_dev }}'/" dojo/__init__.py
sed -ri "s/appVersion: \".*\"/appVersion: \"${{ github.event.inputs.release_number_dev }}\"/" helm/defectdojo/Chart.yaml
sed -ri "s/\"version\": \".*\"/\"version\": \"${{ github.event.inputs.release_number_dev }}\"/" components/package.json
sed -ri 's/__version__ = ".*"/__version__ = "${{ github.event.inputs.release_number_dev }}"/' dojo/__init__.py
sed -ri 's/"version": ".*"/"version": "${{ github.event.inputs.release_number_dev }}"/' components/package.json
sed -ri 's/appVersion: ".*"/appVersion: "${{ github.event.inputs.release_number_dev }}"/' helm/defectdojo/Chart.yaml
CURRENT_CHART_VERSION=$(grep -oP 'version: (\K\S*)?' helm/defectdojo/Chart.yaml | head -1)
sed -ri "0,/version/s/version: \S+/$(echo "version: $CURRENT_CHART_VERSION" | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}')-dev/" helm/defectdojo/Chart.yaml

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/rest-framework-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ jobs:

# phased startup so we can use the exit code from unit test container
- name: Start Postgres
run: docker compose --env-file ./docker/environments/postgres-redis.env up -d postgres
run: docker compose up -d postgres

# no celery or initializer needed for unit tests
- name: Unit tests
timeout-minutes: 10
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env up --no-deps --exit-code-from uwsgi uwsgi
run: docker compose up --no-deps --exit-code-from uwsgi uwsgi
env:
DJANGO_VERSION: ${{ matrix.os }}

- name: Logs
if: failure()
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env logs --tail="2500" uwsgi
run: docker compose logs --tail="2500" uwsgi

- name: Shutdown
if: always()
run: docker compose --profile postgres-redis --env-file ./docker/environments/postgres-redis.env down
run: docker compose down
22 changes: 10 additions & 12 deletions Dockerfile.django-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
# Dockerfile.nginx to use the caching mechanism of Docker.

# Ref: https://devguide.python.org/#branchstatus
FROM python:3.11.9-alpine3.20@sha256:df44c0c0761ddbd6388f4549cab42d24d64d257c2a960ad5b276bb7dab9639c7 as base
FROM base as build
FROM python:3.11.9-alpine3.20@sha256:df44c0c0761ddbd6388f4549cab42d24d64d257c2a960ad5b276bb7dab9639c7 AS base
FROM base AS build
WORKDIR /app
RUN \
apk update && \
apk add --no-cache \
gcc \
build-base \
bind-tools \
mysql-client \
mariadb-dev \
postgresql14-client \
postgresql16-client \
xmlsec \
git \
util-linux \
curl-dev \
openssl \
libffi-dev \
python3-dev \
libpq-dev \
&& \
rm -rf /var/cache/apk/* && \
true
Expand All @@ -31,25 +31,23 @@ COPY requirements.txt ./
# https://github.com/unbit/uwsgi/issues/1318#issuecomment-542238096
RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt

FROM base as django-alpine
FROM base AS django-alpine
WORKDIR /app
ARG uid=1001
ARG gid=1337
ARG appuser=defectdojo
ENV appuser ${appuser}
ENV appuser=${appuser}
RUN \
apk update && \
apk add --no-cache \
openjpeg \
jpeg \
tiff \
bind-tools \
mysql-client \
mariadb-dev \
xmlsec \
git \
util-linux \
postgresql14-client \
postgresql16-client \
curl-dev \
openssl \
# needed for integration-tests
Expand Down Expand Up @@ -136,5 +134,5 @@ ENV \
DD_UWSGI_NUM_OF_THREADS="2"
ENTRYPOINT ["/entrypoint-uwsgi.sh"]

FROM django-alpine as django-unittests
COPY unittests/ ./unittests/
FROM django-alpine AS django-unittests
COPY unittests/ ./unittests/
14 changes: 5 additions & 9 deletions Dockerfile.django-debian
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@
# Dockerfile.nginx to use the caching mechanism of Docker.

# Ref: https://devguide.python.org/#branchstatus
FROM python:3.11.9-slim-bookworm@sha256:8c1036ec919826052306dfb5286e4753ffd9d5f6c24fbc352a5399c3b405b57e as base
FROM base as build
FROM python:3.11.9-slim-bookworm@sha256:8c1036ec919826052306dfb5286e4753ffd9d5f6c24fbc352a5399c3b405b57e AS base
FROM base AS build
WORKDIR /app
RUN \
apt-get -y update && \
apt-get -y install --no-install-recommends \
gcc \
build-essential \
dnsutils \
default-mysql-client \
libmariadb-dev-compat \
libpq-dev \
postgresql-client \
xmlsec1 \
Expand All @@ -32,12 +30,12 @@ COPY requirements.txt ./
# https://github.com/unbit/uwsgi/issues/1318#issuecomment-542238096
RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt

FROM base as django
FROM base AS django
WORKDIR /app
ARG uid=1001
ARG gid=1337
ARG appuser=defectdojo
ENV appuser ${appuser}
ENV appuser=${appuser}
RUN \
apt-get -y update && \
# ugly fix to install postgresql-client without errors
Expand All @@ -48,8 +46,6 @@ RUN \
libjpeg62 \
libtiff6 \
dnsutils \
default-mysql-client \
libmariadb3 \
xmlsec1 \
git \
uuid-runtime \
Expand Down Expand Up @@ -141,5 +137,5 @@ ENV \
DD_UWSGI_NUM_OF_THREADS="2"
ENTRYPOINT ["/entrypoint-uwsgi.sh"]

FROM django as django-unittests
FROM django AS django-unittests
COPY unittests/ ./unittests/
6 changes: 3 additions & 3 deletions Dockerfile.integration-tests-debian
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# code: language=Dockerfile

FROM openapitools/openapi-generator-cli:v7.6.0@sha256:f86ca824293602b71b9b66683cc0011f8ff963858bd853621c554ff5cc7dd1d5 as openapitools
FROM python:3.11.9-slim-bookworm@sha256:8c1036ec919826052306dfb5286e4753ffd9d5f6c24fbc352a5399c3b405b57e as build
FROM openapitools/openapi-generator-cli:v7.7.0@sha256:99924315933d49e7b33a7d2074bb2b64fc8def8f74519939036e24eb48f00336 AS openapitools
FROM python:3.11.9-slim-bookworm@sha256:8c1036ec919826052306dfb5286e4753ffd9d5f6c24fbc352a5399c3b405b57e AS build
WORKDIR /app
RUN \
apt-get -y update && \
Expand Down Expand Up @@ -76,4 +76,4 @@ ENV \
DD_ADMIN_USER=admin \
DD_ADMIN_PASSWORD='' \
DD_BASE_URL="http://localhost:8080/"
CMD ["/entrypoint-integration-tests.sh"]
CMD ["/entrypoint-integration-tests.sh"]
16 changes: 8 additions & 8 deletions Dockerfile.nginx-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
# Dockerfile.django-alpine to use the caching mechanism of Docker.

# Ref: https://devguide.python.org/#branchstatus
FROM python:3.11.9-alpine3.20@sha256:df44c0c0761ddbd6388f4549cab42d24d64d257c2a960ad5b276bb7dab9639c7 as base
FROM base as build
FROM python:3.11.9-alpine3.20@sha256:df44c0c0761ddbd6388f4549cab42d24d64d257c2a960ad5b276bb7dab9639c7 AS base
FROM base AS build
WORKDIR /app
RUN \
apk update && \
apk add --no-cache \
gcc \
build-base \
bind-tools \
mysql-client \
mariadb-dev \
postgresql14-client \
postgresql16-client \
xmlsec \
git \
util-linux \
curl-dev \
openssl \
libffi-dev \
python3-dev \
libpq-dev \
&& \
rm -rf /var/cache/apk/* && \
true
Expand All @@ -34,7 +34,7 @@ RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
FROM build AS collectstatic

# Node installation from https://github.com/nodejs/docker-node
ENV NODE_VERSION 20.11.0
ENV NODE_VERSION=20.11.0

RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
Expand Down Expand Up @@ -103,7 +103,7 @@ RUN addgroup -g 1000 node \
&& node --version \
&& npm --version

ENV YARN_VERSION 1.22.19
ENV YARN_VERSION=1.22.19

RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
&& for key in \
Expand Down Expand Up @@ -140,7 +140,7 @@ COPY manage.py ./
COPY dojo/ ./dojo/
RUN env DD_SECRET_KEY='.' python3 manage.py collectstatic --noinput && true

FROM nginx:1.27.0-alpine@sha256:a45ee5d042aaa9e81e013f97ae40c3dda26fbe98f22b6251acdf28e579560d55
FROM nginx:1.27.0-alpine@sha256:208b70eefac13ee9be00e486f79c695b15cef861c680527171a27d253d834be9
ARG uid=1001
ARG appuser=defectdojo
COPY --from=collectstatic /app/static/ /usr/share/nginx/html/static/
Expand Down
Loading
Loading