Skip to content

Commit

Permalink
Merge branch 'bugfix' into notify
Browse files Browse the repository at this point in the history
  • Loading branch information
Maffooch committed Dec 17, 2024
2 parents 4057df7 + 0d58217 commit 0479f26
Show file tree
Hide file tree
Showing 876 changed files with 464,274 additions and 3,763 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-docker-images-for-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
# export docker images to be used in next jobs below
- name: Upload image ${{ matrix.docker-image }} as artifact
timeout-minutes: 10
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.docker-image }}
name: built-docker-image-${{ matrix.docker-image }}-${{ matrix.os }}
path: ${{ matrix.docker-image }}-${{ matrix.os }}_img
retention-days: 1
2 changes: 1 addition & 1 deletion .github/workflows/fetch-oas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: docker compose down

- name: Upload oas.${{ matrix.file-type }} as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: oas-${{ matrix.file-type }}
path: oas.${{ matrix.file-type }}
Expand Down
44 changes: 20 additions & 24 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.81.0'
hugo-version: '0.125.3'
extended: true

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '22.5.1'

- name: Cache dependencies
uses: actions/cache@v4
Expand All @@ -33,32 +33,28 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive # Fetch the Docsy theme
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
ref: 'dev'

- run: cd docs && npm ci && hugo --minify --config config.dev.toml
- run: ls -l ./docs/public/*

# for dev we move everything into a subfolder, so the master version stays in the root
- run: mkdir /tmp/dev && mv docs/public/* /tmp/dev/

- uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive # Fetch the Docsy theme
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
ref: 'master'

- run: cd docs && npm ci && hugo --minify --config config.master.toml
- run: mv /tmp/dev docs/public/
- run: ls -l ./docs/public/*
submodules: recursive
fetch-depth: 0

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

- name: Install dependencies
run: cd docs && npm ci

- name: Build production website
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: cd docs && hugo --minify --gc --config config/production/hugo.toml

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with: # publishes to the `gh-pages` branch by default
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/public
cname: docs.defectdojo.com
12 changes: 8 additions & 4 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,18 @@ jobs:

# load docker images from build jobs
- name: Load images from artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: built-docker-image
pattern: built-docker-image-*
merge-multiple: true

- name: Load docker images
timeout-minutes: 10
run: |-
docker load -i nginx/nginx-${{ matrix.os }}_img
docker load -i django/django-${{ matrix.os }}_img
docker load -i integration-tests/integration-tests-debian_img
docker load -i built-docker-image/nginx-${{ matrix.os }}_img
docker load -i built-docker-image/django-${{ matrix.os }}_img
docker load -i built-docker-image/integration-tests-debian_img
docker images
- name: Set integration-test mode
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/k8s-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,18 @@ jobs:
minikube status
- name: Load images from artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: built-docker-image
pattern: built-docker-image-*
merge-multiple: true

- name: Load docker images
timeout-minutes: 10
run: |-
eval $(minikube docker-env)
docker load -i nginx/nginx-${{ matrix.os }}_img
docker load -i django/django-${{ matrix.os }}_img
docker load -i built-docker-image/nginx-${{ matrix.os }}_img
docker load -i built-docker-image/django-${{ matrix.os }}_img
docker images
- name: Configure HELM repos
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/release-3-master-into-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,11 @@ jobs:
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
- name: Update settings SHA
run: sha256sum dojo/settings/settings.dist.py | cut -d ' ' -f1 > dojo/settings/.settings.dist.py.sha256sum

- name: Check numbers
run: |
grep version dojo/__init__.py
grep appVersion helm/defectdojo/Chart.yaml
grep version components/package.json
cat dojo/settings/.settings.dist.py.sha256sum
- name: Create upgrade notes to documentation
run: |
Expand All @@ -72,8 +68,8 @@ jobs:
description: No special instructions.
---
There are no special instructions for upgrading to $minorv.x. Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/$patchv) for the contents of the release.
" > docs/content/en/getting_started/upgrading/$minorv.md
git add docs/content/en/getting_started/upgrading/$minorv.md
" > docs/content/en/open_source/upgrading/$minorv.md
git add docs/content/en/open_source/upgrading/$minorv.md
if: endsWith(github.event.inputs.release_number_new, '.0') && endsWith(github.event.inputs.release_number_dev, '.0-dev')

- name: Push version changes
Expand Down Expand Up @@ -136,15 +132,11 @@ jobs:
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
- name: Update settings SHA
run: sha256sum dojo/settings/settings.dist.py | cut -d ' ' -f1 > dojo/settings/.settings.dist.py.sha256sum

- name: Check numbers
run: |
grep version dojo/__init__.py
grep appVersion helm/defectdojo/Chart.yaml
grep version components/package.json
cat dojo/settings/.settings.dist.py.sha256sum
- name: Push version changes
uses: stefanzweifel/[email protected]
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Load OAS files from artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
pattern: oas-*

- name: Upload Release Asset - OpenAPI Specification - YAML
id: upload-release-asset-yaml
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/rest-framework-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ jobs:

# load docker images from build jobs
- name: Load images from artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: built-docker-image
pattern: built-docker-image-*
merge-multiple: true

- name: Load docker images
timeout-minutes: 10
run: |-
docker load -i nginx/nginx-${{ matrix.os }}_img
docker load -i django/django-${{ matrix.os }}_img
docker load -i built-docker-image/nginx-${{ matrix.os }}_img
docker load -i built-docker-image/django-${{ matrix.os }}_img
docker images
# run tests with docker compose
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/submodule-update.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,14 @@ helm/defectdojo/charts
docs/public
docs/node_modules
docs/resources
docs/hugo_stats.json
docs/.gitpod.yml
docs/.npmignore
docs/.npmrc
docs/.prettierignore
docs/.prettierrc.yaml
docs/.codesandbox/tasks.json
docs/.devcontainer/devcontainer.json
docs/.devcontainer/Dockerfile
docs/LICENSE
docs/.hugo_build.lock
2 changes: 1 addition & 1 deletion Dockerfile.integration-tests-debian
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# code: language=Dockerfile

FROM openapitools/openapi-generator-cli:v7.9.0@sha256:bb32f5f0c9f5bdbb7b00959e8009de0230aedc200662701f05fc244c36f967ba AS openapitools
FROM openapitools/openapi-generator-cli:v7.10.0@sha256:f2054a5a7908ad81017d0f0839514ba5eab06ae628914ff71554d46fac1bcf7a AS openapitools
FROM python:3.11.9-slim-bookworm@sha256:8c1036ec919826052306dfb5286e4753ffd9d5f6c24fbc352a5399c3b405b57e AS build
WORKDIR /app
RUN \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.nginx-alpine
Original file line number Diff line number Diff line change
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.2-alpine@sha256:2140dad235c130ac861018a4e13a6bc8aea3a35f3a40e20c1b060d51a7efd250
FROM nginx:1.27.2-alpine@sha256:74175cf34632e88c6cfe206897cbfe2d2fecf9bf033c40e7f9775a3689e8adc7
ARG uid=1001
ARG appuser=defectdojo
COPY --from=collectstatic /app/static/ /usr/share/nginx/html/static/
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.nginx-debian
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ COPY dojo/ ./dojo/

RUN env DD_SECRET_KEY='.' python3 manage.py collectstatic --noinput && true

FROM nginx:1.27.2-alpine@sha256:2140dad235c130ac861018a4e13a6bc8aea3a35f3a40e20c1b060d51a7efd250
FROM nginx:1.27.2-alpine@sha256:74175cf34632e88c6cfe206897cbfe2d2fecf9bf033c40e7f9775a3689e8adc7
ARG uid=1001
ARG appuser=defectdojo
COPY --from=collectstatic /app/static/ /usr/share/nginx/html/static/
Expand Down
4 changes: 2 additions & 2 deletions components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "defectdojo",
"version": "2.41.0-dev",
"version": "2.42.0-dev",
"license" : "BSD-3-Clause",
"private": true,
"dependencies": {
Expand Down Expand Up @@ -35,7 +35,7 @@
"metismenu": "~3.0.7",
"moment": "^2.30.1",
"morris.js": "morrisjs/morris.js",
"pdfmake": "^0.2.14",
"pdfmake": "^0.2.15",
"startbootstrap-sb-admin-2": "1.0.7"
},
"engines": {
Expand Down
Loading

0 comments on commit 0479f26

Please sign in to comment.