Merge branch 'main' into docs
This commit is contained in:
@@ -196,9 +196,9 @@ docker-compose.yaml for mailman-web container. By default, `SMTP_HOST` points
|
|||||||
to the gateway of the web container, which is the host itself.
|
to the gateway of the web container, which is the host itself.
|
||||||
|
|
||||||
You can also use the environment variables `SMTP_HOST` (defaults to
|
You can also use the environment variables `SMTP_HOST` (defaults to
|
||||||
the container's gateway and is set automatically), `SMTP_PORT` (defaults to `25`),
|
the container's gateway), `SMTP_PORT` (defaults to `25`), `SMTP_HOST_USER` (defaults to
|
||||||
`SMTP_HOST_USER` (defaults to an empty string), `SMTP_HOST_PASSWORD` (defaults
|
an empty string), `SMTP_HOST_PASSWORD` (defaults to an empty string),
|
||||||
to an empty string) and `SMTP_USE_TLS` (defaults to `False`).
|
`SMTP_USE_TLS` (defaults to `False`) and `SMTP_USE_SSL` (defaults to `False`).
|
||||||
|
|
||||||
This is required in addition to the [Setup your MTA](#setting-up-your-mta)
|
This is required in addition to the [Setup your MTA](#setting-up-your-mta)
|
||||||
section below, which covers email setup for Mailman Core.
|
section below, which covers email setup for Mailman Core.
|
||||||
|
|||||||
@@ -25,14 +25,17 @@ def main():
|
|||||||
gl = gitlab.Gitlab('https://gitlab.com/', gl_token)
|
gl = gitlab.Gitlab('https://gitlab.com/', gl_token)
|
||||||
|
|
||||||
project = gl.projects.get(project_name)
|
project = gl.projects.get(project_name)
|
||||||
branch = project.branches.get(branch_name)
|
|
||||||
top_commit = project.commits.get(branch.commit['short_id'])
|
|
||||||
|
|
||||||
if top_commit.last_pipeline['status'] == 'success':
|
|
||||||
print(top_commit.short_id)
|
|
||||||
else:
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
|
# Find the last commit in the branch that passed the CI
|
||||||
|
# successfully and return the reference to it.
|
||||||
|
for commit in project.commits.list(ref=branch_name):
|
||||||
|
stasues = list(status.status == 'success' for status in
|
||||||
|
commit.statuses.list() if status.allow_failure == False)
|
||||||
|
if len(stasues) == 0:
|
||||||
|
continue
|
||||||
|
if all(stasues):
|
||||||
|
print(commit.short_id)
|
||||||
|
break
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ EMAIL_PORT = os.environ.get('SMTP_PORT', 25)
|
|||||||
EMAIL_HOST_USER = os.environ.get('SMTP_HOST_USER', '')
|
EMAIL_HOST_USER = os.environ.get('SMTP_HOST_USER', '')
|
||||||
EMAIL_HOST_PASSWORD = os.environ.get('SMTP_HOST_PASSWORD', '')
|
EMAIL_HOST_PASSWORD = os.environ.get('SMTP_HOST_PASSWORD', '')
|
||||||
EMAIL_USE_TLS = os.environ.get('SMTP_USE_TLS', False)
|
EMAIL_USE_TLS = os.environ.get('SMTP_USE_TLS', False)
|
||||||
|
EMAIL_USE_SSL = os.environ.get('SMTP_USE_SSL', False)
|
||||||
|
|
||||||
# Compatibility with Bootstrap 3
|
# Compatibility with Bootstrap 3
|
||||||
from django.contrib.messages import constants as messages # flake8: noqa
|
from django.contrib.messages import constants as messages # flake8: noqa
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ change them unless you know what you want.
|
|||||||
- `SMTP_USE_TLS`: Specifies wheather the SMTP connection is encrypted
|
- `SMTP_USE_TLS`: Specifies wheather the SMTP connection is encrypted
|
||||||
via TLS. Default is `False`.
|
via TLS. Default is `False`.
|
||||||
|
|
||||||
|
- `SMTP_USE_SSL`: Specifies wheather the SMTP connection is encrypted
|
||||||
|
via SSL. Default is `False`.
|
||||||
|
|
||||||
- `DJANGO_LOG_URL`: Path to the django's log file. Defaults to
|
- `DJANGO_LOG_URL`: Path to the django's log file. Defaults to
|
||||||
`/opt/mailman-web-data/logs/mailmanweb.log`.
|
`/opt/mailman-web-data/logs/mailmanweb.log`.
|
||||||
|
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ EMAIL_PORT = os.environ.get('SMTP_PORT', 25)
|
|||||||
EMAIL_HOST_USER = os.environ.get('SMTP_HOST_USER', '')
|
EMAIL_HOST_USER = os.environ.get('SMTP_HOST_USER', '')
|
||||||
EMAIL_HOST_PASSWORD = os.environ.get('SMTP_HOST_PASSWORD', '')
|
EMAIL_HOST_PASSWORD = os.environ.get('SMTP_HOST_PASSWORD', '')
|
||||||
EMAIL_USE_TLS = os.environ.get('SMTP_USE_TLS', False)
|
EMAIL_USE_TLS = os.environ.get('SMTP_USE_TLS', False)
|
||||||
|
EMAIL_USE_SSL = os.environ.get('SMTP_USE_SSL', False)
|
||||||
|
|
||||||
# Compatibility with Bootstrap 3
|
# Compatibility with Bootstrap 3
|
||||||
from django.contrib.messages import constants as messages # flake8: noqa
|
from django.contrib.messages import constants as messages # flake8: noqa
|
||||||
|
|||||||
Reference in New Issue
Block a user