Skip to content

Commit 64ad8e9

Browse files
authored
Merge branch 'dev' into docker_python3.12
2 parents 8655614 + d8afc96 commit 64ad8e9

File tree

104 files changed

+3017
-1082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+3017
-1082
lines changed

.github/workflows/close-stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Close stale issues and PRs
19-
uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
19+
uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
2020
with:
2121
# Disable automatic stale marking - only close manually labeled items
2222
days-before-stale: -1

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
extended: true
2020

2121
- name: Setup Node
22-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
22+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2323
with:
2424
node-version: '22.19.0'
2525

.github/workflows/k8s-tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@ jobs:
108108
echo "INFO: status:"
109109
kubectl get pods
110110
echo "INFO: logs:"
111-
kubectl logs --selector=$3 --all-containers=true
111+
kubectl logs --selector=$3 --all-containers=true
112112
exit 1
113113
fi
114114
return ${?}
115115
}
116116
echo "Waiting for init job..."
117-
to_complete "condition=Complete" job "defectdojo.org/component=initializer"
117+
to_complete "condition=Complete" job "defectdojo.org/component=initializer"
118118
echo "Waiting for celery pods..."
119-
to_complete "condition=ready" pod "defectdojo.org/component=celery"
119+
to_complete "condition=ready" pod "defectdojo.org/component=celery"
120120
echo "Waiting for django pod..."
121-
to_complete "condition=ready" pod "defectdojo.org/component=django"
121+
to_complete "condition=ready" pod "defectdojo.org/component=django"
122122
echo "Pods up and ready to rumbole"
123123
kubectl get pods
124124
RETRY=0
@@ -132,15 +132,15 @@ jobs:
132132
--max-time 20 \
133133
--head \
134134
--header "Host: $DD_HOSTNAME" \
135-
http://$DJANGO_IP/login?next=/)
135+
"http://${DJANGO_IP}/login?next=/")
136136
echo $OUT
137-
CR=`echo $OUT | egrep "^HTTP" | cut -d' ' -f2`
137+
CR=$(echo $OUT | egrep "^HTTP" | cut -d' ' -f2)
138138
echo $CR
139139
if [[ $CR -ne 200 ]]; then
140140
echo $RETRY
141141
if [[ $RETRY -gt 2 ]]; then
142142
kubectl get pods
143-
echo `kubectl logs --tail=30 -l defectdojo.org/component=django -c uwsgi`
143+
echo $(kubectl logs --tail=30 -l defectdojo.org/component=django -c uwsgi)
144144
echo "ERROR: cannot display login screen; got HTTP code $CR"
145145
exit 1
146146
else
@@ -165,7 +165,7 @@ jobs:
165165
--data-raw "username=admin&password=$ADMIN_PASS" \
166166
--output /dev/null \
167167
--write-out "%{http_code}\n" \
168-
http://$DJANGO_IP/api/v2/api-token-auth/)
168+
"http://${DJANGO_IP}/api/v2/api-token-auth/")
169169
echo $CR
170170
if [[ $CR -ne 200 ]]; then
171171
echo "ERROR: login is not possible; got HTTP code $CR"
@@ -174,8 +174,8 @@ jobs:
174174
echo "Result received"
175175
fi
176176
echo "Final Check of components"
177-
errors=`kubectl get pods | grep Error | awk '{print $1}'`
178-
if [[ ! -z $errors ]]; then
177+
errors=$(kubectl get pods | grep Error | awk '{print $1}')
178+
if [[ ! -z $errors ]]; then
179179
echo "Few pods with errors"
180180
for line in $errors; do
181181
echo "Dumping log from $line"

.github/workflows/pr-labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: "Autolabeler"
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
18+
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
1919
with:
2020
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2121
sync-labels: true

.github/workflows/release-1-create-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
branch: ${{ env.NEW_BRANCH }}
9898

9999
- name: Create Pull Request
100-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
100+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
101101
with:
102102
github-token: ${{ secrets.GITHUB_TOKEN }}
103103
script: |

.github/workflows/release-3-master-into-dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
branch: ${{ env.NEW_BRANCH }}
8585

8686
- name: Create Pull Request
87-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
87+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
8888
with:
8989
github-token: ${{ secrets.GITHUB_TOKEN }}
9090
script: |
@@ -149,7 +149,7 @@ jobs:
149149
branch: ${{ env.NEW_BRANCH }}
150150

151151
- name: Create Pull Request
152-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
152+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
153153
with:
154154
github-token: ${{ secrets.GITHUB_TOKEN }}
155155
script: |

.github/workflows/release-x-manual-helm-chart.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
helm dependency update ./helm/defectdojo
7272
7373
- name: Add yq
74-
uses: mikefarah/yq@f03c9dc599c37bfcaf533427211d05e51e6fee64 # v4.47.1
74+
uses: mikefarah/yq@6251e95af8df3505def48c71f3119836701495d6 # v4.47.2
7575

7676
- name: Pin version docker version
7777
id: pin_image
@@ -88,7 +88,7 @@ jobs:
8888
echo "chart_version=$(ls build | cut -d '-' -f 2,3 | sed 's|\.tgz||')" >> $GITHUB_ENV
8989
9090
- name: Create release ${{ inputs.release_number }}
91-
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
91+
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
9292
with:
9393
name: '${{ inputs.release_number }} 🌈'
9494
tag_name: ${{ inputs.release_number }}

.github/workflows/test-helm-chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Helm
2323
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
2424

25-
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
25+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
2626
with:
2727
python-version: 3.13
2828

.github/workflows/validate_docs_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
extended: true
1717

1818
- name: Setup Node
19-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
19+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2020
with:
2121
node-version: '22.19.0'
2222

Dockerfile.django-alpine

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ COPY requirements.txt ./
3131
# https://github.com/unbit/uwsgi/issues/1318#issuecomment-542238096
3232
RUN CPUCOUNT=1 pip3 wheel --wheel-dir=/tmp/wheels -r ./requirements.txt
3333

34-
FROM base AS django
34+
FROM base AS release
3535
WORKDIR /app
3636
ARG uid=1001
3737
ARG gid=1337
@@ -132,9 +132,15 @@ ENV \
132132
DD_INITIALIZE=true \
133133
DD_UWSGI_MODE="socket" \
134134
DD_UWSGI_ENDPOINT="0.0.0.0:3031" \
135-
DD_UWSGI_NUM_OF_PROCESSES="2" \
136-
DD_UWSGI_NUM_OF_THREADS="2"
135+
DD_UWSGI_NUM_OF_PROCESSES="4" \
136+
DD_UWSGI_NUM_OF_THREADS="4"
137137
ENTRYPOINT ["/entrypoint-uwsgi.sh"]
138138

139-
FROM django AS django-unittests
139+
FROM release AS development
140+
USER root
141+
COPY requirements-dev.txt ./
142+
RUN pip3 install --no-cache-dir -r requirements-dev.txt
143+
USER ${uid}
144+
145+
FROM development AS django-unittests
140146
COPY unittests/ ./unittests/

0 commit comments

Comments
 (0)