From 560e26fbd70e1588e4ae3702ce3d899c6e86306b Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Tue, 25 Oct 2022 23:24:55 -0700 Subject: [PATCH 1/8] Store the logs for jobs for inspection on failures --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c2aaaa5..1cc8dcb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,6 +42,11 @@ jobs: command: | python3 --version python3 deploy.py + - store_artifacts: + path: /opt/mailman/web/logs/ + + - store_artifacts: + path: /opt/mailman/core/var/logs workflows: version: 2 From 208017f9a00fdaf1b2d0671e97fb879e804fd911 Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Tue, 25 Oct 2022 23:25:57 -0700 Subject: [PATCH 2/8] Test dependabot for Dockerfiles & Bump Postgres to 11 (#557) * Test dependabot for Dockerfiles. * Also for github actions * Update dependabot.yml * Fix urls.py for new versions of Django * Fix urls.py for postorius. * Bump dependency on Postgresql. * Bump dependency on Django * Add dependency on tzdata. --- .github/dependabot.yml | 18 ++++++++++++++++++ docker-compose.yaml | 4 ++-- postorius/mailman-web/urls.py | 15 +++++++-------- web/Dockerfile.dev | 5 +++-- web/mailman-web/urls.py | 17 ++++++++--------- 5 files changed, 38 insertions(+), 21 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b849982 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "docker" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + # Enable version updates for Actions + - package-ecosystem: "github-actions" + # Look for `.github/workflows` in the `root` directory + directory: "/" + # Check for updates once a week + schedule: + interval: "weekly" diff --git a/docker-compose.yaml b/docker-compose.yaml index 5390bf1..ecc7ec9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -49,7 +49,7 @@ services: - POSTGRES_DB=mailmandb - POSTGRES_USER=mailman - POSTGRES_PASSWORD=mailmanpass - image: postgres:9.6-alpine + image: postgres:11-alpine volumes: - /opt/mailman/database:/var/lib/postgresql/data networks: @@ -62,4 +62,4 @@ networks: driver: default config: - - subnet: 172.19.199.0/24 \ No newline at end of file + subnet: 172.19.199.0/24 diff --git a/postorius/mailman-web/urls.py b/postorius/mailman-web/urls.py index 804b9e3..6a9bbaf 100644 --- a/postorius/mailman-web/urls.py +++ b/postorius/mailman-web/urls.py @@ -16,19 +16,18 @@ # You should have received a copy of the GNU General Public License along with # Postorius. If not, see . - -from django.conf.urls import include, url +from django.conf.urls import include from django.contrib import admin -from django.urls import reverse_lazy +from django.urls import path, reverse_lazy from django.views.generic import RedirectView urlpatterns = [ - url(r'^$', RedirectView.as_view( + path(r'^$', RedirectView.as_view( url=reverse_lazy('list_index'), permanent=True)), - url(r'^postorius/', include('postorius.urls')), - url(r'', include('django_mailman3.urls')), - url(r'^accounts/', include('allauth.urls')), + path(r'postorius/', include('postorius.urls')), + path(r'', include('django_mailman3.urls')), + path(r'accounts/', include('allauth.urls')), # Django admin - url(r'^admin/', admin.site.urls), + path(r'^admin/', admin.site.urls), ] diff --git a/web/Dockerfile.dev b/web/Dockerfile.dev index 9b2809c..b43e005 100644 --- a/web/Dockerfile.dev +++ b/web/Dockerfile.dev @@ -33,10 +33,11 @@ RUN --mount=type=cache,target=/root/.cache \ mysqlclient \ xapian-haystack \ django-auth-ldap \ - python-memcached \ + python-memcached \ + tzdata \ diskcache \ django-utils-six \ - && python3 -m pip install -U 'Django<3.2' \ + && python3 -m pip install -U 'Django<4.3' \ && python3 -m pip install -U \ git+https://gitlab.com/mailman/django-mailman3 \ && apk del .build-deps \ diff --git a/web/mailman-web/urls.py b/web/mailman-web/urls.py index e8bb66c..0e14f66 100644 --- a/web/mailman-web/urls.py +++ b/web/mailman-web/urls.py @@ -16,20 +16,19 @@ # You should have received a copy of the GNU General Public License along with # Postorius. If not, see . - -from django.conf.urls import include, url +from django.conf.urls import include from django.contrib import admin -from django.urls import reverse_lazy +from django.urls import path, reverse_lazy from django.views.generic import RedirectView urlpatterns = [ - url(r'^$', RedirectView.as_view( + path(r'^$', RedirectView.as_view( url=reverse_lazy('list_index'), permanent=True)), - url(r'^postorius/', include('postorius.urls')), - url(r'^hyperkitty/', include('hyperkitty.urls')), - url(r'', include('django_mailman3.urls')), - url(r'^accounts/', include('allauth.urls')), + path(r'postorius/', include('postorius.urls')), + path(r'hyperkitty/', include('hyperkitty.urls')), + path(r'', include('django_mailman3.urls')), + path(r'accounts/', include('allauth.urls')), # Django admin - url(r'^admin/', admin.site.urls), + path(r'^admin/', admin.site.urls), ] From 04be7fd46a4de2e6b52498ab46a611f170d9f31d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Oct 2022 06:26:18 +0000 Subject: [PATCH 3/8] Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/publish_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml index 2d202e6..44a503f 100644 --- a/.github/workflows/publish_docs.yml +++ b/.github/workflows/publish_docs.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout main - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Deploy docs uses: mhausenblas/mkdocs-deploy-gh-pages@master From 06576b608a4e1b8bc6758c27752c15069c5beb51 Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Tue, 25 Oct 2022 23:28:48 -0700 Subject: [PATCH 4/8] Add more specific file path for Dockerfile check --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b849982..81fd7dc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,7 +6,7 @@ version: 2 updates: - package-ecosystem: "docker" # See documentation for possible values - directory: "/" # Location of package manifests + directory: "/core" # Location of package manifests schedule: interval: "weekly" # Enable version updates for Actions From 9ab058b3480fbe0127c4df4e52910a115fad61c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Oct 2022 06:46:31 +0000 Subject: [PATCH 5/8] Bump alpine from 3.12 to 3.16.2 in /core Bumps alpine from 3.12 to 3.16.2. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- core/Dockerfile | 2 +- core/Dockerfile.dev | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Dockerfile b/core/Dockerfile index ca904e6..c916a7c 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -1,5 +1,5 @@ # syntax = docker/dockerfile:1.3 -FROM alpine:3.12 +FROM alpine:3.16.2 #Add startup script to container COPY docker-entrypoint.sh /usr/local/bin/ diff --git a/core/Dockerfile.dev b/core/Dockerfile.dev index bb0c0b8..186c43e 100644 --- a/core/Dockerfile.dev +++ b/core/Dockerfile.dev @@ -1,5 +1,5 @@ # syntax = docker/dockerfile:1.3 -FROM alpine:3.12 +FROM alpine:3.16.2 #Add startup script to container COPY docker-entrypoint.sh /usr/local/bin/ From c9b7cf0d26782e439c538963a1adbd4be0709b01 Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Tue, 25 Oct 2022 23:51:03 -0700 Subject: [PATCH 6/8] Update dockerfiles for all images. --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 81fd7dc..0c2dd78 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,6 +9,14 @@ updates: directory: "/core" # Location of package manifests schedule: interval: "weekly" + - package-ecosystem: "docker" # See documentation for possible values + directory: "/web" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "docker" # See documentation for possible values + directory: "/postorius" # Location of package manifests + schedule: + interval: "weekly" # Enable version updates for Actions - package-ecosystem: "github-actions" # Look for `.github/workflows` in the `root` directory From 76c803e18a24da5f6234bc66ca1e30e55a7858cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Oct 2022 07:00:22 +0000 Subject: [PATCH 7/8] Bump alpine from 3.12 to 3.16.2 in /web Bumps alpine from 3.12 to 3.16.2. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- web/Dockerfile | 2 +- web/Dockerfile.dev | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/Dockerfile b/web/Dockerfile index 297f074..cd0c94e 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,5 +1,5 @@ # syntax = docker/dockerfile:1.3 -FROM alpine:3.12 +FROM alpine:3.16.2 # Add needed files for uwsgi server + settings for django COPY mailman-web /opt/mailman-web diff --git a/web/Dockerfile.dev b/web/Dockerfile.dev index b43e005..9049528 100644 --- a/web/Dockerfile.dev +++ b/web/Dockerfile.dev @@ -1,5 +1,5 @@ # syntax = docker/dockerfile:1.3 -FROM alpine:3.12 +FROM alpine:3.16.2 # Add needed files for uwsgi server + settings for django COPY mailman-web /opt/mailman-web From c5174266521814e53032da7c382d7fea2d9dc246 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Oct 2022 07:00:22 +0000 Subject: [PATCH 8/8] Bump alpine from 3.12 to 3.16.2 in /postorius Bumps alpine from 3.12 to 3.16.2. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- postorius/Dockerfile | 2 +- postorius/Dockerfile.dev | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/postorius/Dockerfile b/postorius/Dockerfile index 408c832..fbf2d81 100644 --- a/postorius/Dockerfile +++ b/postorius/Dockerfile @@ -1,5 +1,5 @@ # syntax = docker/dockerfile:1.3 -FROM alpine:3.12 +FROM alpine:3.16.2 # Add needed files for uwsgi server + settings for django COPY mailman-web /opt/mailman-web diff --git a/postorius/Dockerfile.dev b/postorius/Dockerfile.dev index e427a1c..bedac05 100644 --- a/postorius/Dockerfile.dev +++ b/postorius/Dockerfile.dev @@ -1,5 +1,5 @@ # syntax = docker/dockerfile:1.3 -FROM alpine:3.12 +FROM alpine:3.16.2 # Add needed files for uwsgi server + settings for django COPY mailman-web /opt/mailman-web