mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
ci: Setup production job for Focal.
Run production suites on Ubuntu Focal.
Added separate success-http-headers files for Focal and Bionic.
Also excluded them from whitespace rules in lint.
memcached 1.5.22 in Ubuntu 20.04 has a bug where it looks for its SASL
configuration at /etc/sasl2/memcached.conf/memcached.conf instead of
/etc/sasl2/memcached.conf.
We already use a workaround for this while applying puppet configurations in
99e71f3786
but for docker builds we used
do memcached hack since we can not use systemd in docker containers.
This commit is contained in:
@@ -284,7 +284,8 @@ jobs:
|
||||
# Must be relative path from root
|
||||
paths:
|
||||
- zulip-server-test.tar.gz
|
||||
- success-http-headers.txt
|
||||
- success-http-headers-bionic.txt
|
||||
- success-http-headers-focal.txt
|
||||
- production-install
|
||||
- production
|
||||
- production-extract-tarball
|
||||
@@ -327,7 +328,14 @@ jobs:
|
||||
at: /tmp
|
||||
|
||||
- *create_cache_directories
|
||||
- *do_bionic_hack
|
||||
|
||||
- run:
|
||||
name: do memcached hack
|
||||
command: |
|
||||
# Temporary hack till memcached upstream is updated in Focal.
|
||||
# https://bugs.launchpad.net/ubuntu/+source/memcached/+bug/1878721
|
||||
echo "export SASL_CONF_PATH=/etc/sasl2" | sudo tee - a /etc/default/memcached
|
||||
|
||||
- *production_extract_tarball
|
||||
- *restore_cache_package_json
|
||||
- *install_production
|
||||
@@ -351,6 +359,6 @@ workflows:
|
||||
- "bionic-production-install":
|
||||
requires:
|
||||
- "bionic-production-build"
|
||||
# - "focal-production-install":
|
||||
# requires:
|
||||
# - "bionic-production-build"
|
||||
- "focal-production-install":
|
||||
requires:
|
||||
- "bionic-production-build"
|
||||
|
@@ -29,6 +29,7 @@ if ! ./tools/build-release-tarball test; then
|
||||
fi
|
||||
|
||||
mv /tmp/tmp.*/zulip-server-test.tar.gz /tmp/
|
||||
cp -a tools/ci/success-http-headers.txt /tmp/success-http-headers.txt
|
||||
cp -a tools/ci/success-http-headers-bionic.txt /tmp/success-http-headers-bionic.txt
|
||||
cp -a tools/ci/success-http-headers-focal.txt /tmp/success-http-headers-focal.txt
|
||||
cp -a tools/ci/production-install /tmp/production-install
|
||||
cp -a tools/ci/production-extract-tarball /tmp/production-extract-tarball
|
||||
|
@@ -11,6 +11,11 @@ ZULIP_PATH=/home/circleci/zulip
|
||||
APT_OPTIONS=(-o 'Dpkg::Options::=--force-confdef' -o 'Dpkg::Options::=--force-confold')
|
||||
apt-get update
|
||||
|
||||
if [ -f /etc/os-release ]; then
|
||||
os_info="$(. /etc/os-release; printf '%s\n' "$VERSION_CODENAME")"
|
||||
{ read -r os_version_codename || true; } <<< "$os_info"
|
||||
fi
|
||||
|
||||
if ! apt-get dist-upgrade -y "${APT_OPTIONS[@]}"; then
|
||||
echo "\`apt-get dist-upgrade\`: Failure occurred while trying to perform distribution upgrade, Retrying..."
|
||||
apt-get dist-upgrade -y "${APT_OPTIONS[@]}"
|
||||
@@ -54,8 +59,8 @@ grep -vi '\(Vary\|Content-Language\|expires\|issued by\|modified\|saved\|[.][.][
|
||||
|
||||
# Simplify the diff by getting replacing 4-5 digit length numbers with <Length>.
|
||||
sed -i 's|Length: [0-9]\+\( [(][0-9]\+[.][0-9]K[)]\)\?|Length: <Length>|' /tmp/http-headers-processed
|
||||
sed -i 's|Length: [0-9]\+\( [(][0-9]\+[.][0-9]K[)]\)\?|Length: <Length>|' /tmp/success-http-headers.txt
|
||||
if ! diff -ur /tmp/http-headers-processed /tmp/success-http-headers.txt; then
|
||||
sed -i 's|Length: [0-9]\+\( [(][0-9]\+[.][0-9]K[)]\)\?|Length: <Length>|' /tmp/success-http-headers-"$os_version_codename".txt
|
||||
if ! diff -ur /tmp/http-headers-processed /tmp/success-http-headers-"$os_version_codename".txt; then
|
||||
set +x
|
||||
echo
|
||||
echo "FAILURE: The HTTP Headers returned from loading the homepage on the server do not match the contents of tools/ci/success-http-headers.txt. Typically, this means that the server threw a 500 when trying to load the homepage."
|
||||
|
29
tools/ci/success-http-headers-focal.txt
Normal file
29
tools/ci/success-http-headers-focal.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
Self-signed certificate encountered.
|
||||
WARNING: no certificate subject alternative name matches
|
||||
requested host name ‘localhost’.
|
||||
HTTP/1.1 302 Found
|
||||
Server: nginx/1.17.10 (Ubuntu)
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Content-Length: 0
|
||||
Connection: keep-alive
|
||||
Location: /login/
|
||||
Strict-Transport-Security: max-age=15768000
|
||||
X-Frame-Options: DENY
|
||||
X-Content-Type-Options: nosniff
|
||||
X-XSS-Protection: 1; mode=block
|
||||
Location: /login/ [following]
|
||||
Reusing existing connection to localhost:443.
|
||||
HTTP/1.1 200 OK
|
||||
Server: nginx/1.17.10 (Ubuntu)
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Content-Length: 6361
|
||||
Connection: keep-alive
|
||||
Strict-Transport-Security: max-age=15768000
|
||||
X-Frame-Options: DENY
|
||||
X-Content-Type-Options: nosniff
|
||||
X-XSS-Protection: 1; mode=block
|
||||
Length: 6361 (6.2K) [text/html]
|
||||
Saving to: ‘/tmp/index.html’
|
||||
|
||||
|
||||
|
@@ -76,7 +76,7 @@ whitespace_rules: List["Rule"] = [
|
||||
},
|
||||
{'pattern': '\t',
|
||||
'strip': '\n',
|
||||
'exclude': {'tools/ci/success-http-headers.txt'},
|
||||
'exclude': {'tools/ci/success-http-headers-bionic.txt', 'tools/ci/success-http-headers-focal.txt'},
|
||||
'description': 'Fix tab-based whitespace'},
|
||||
]
|
||||
comma_whitespace_rule: List["Rule"] = [
|
||||
|
Reference in New Issue
Block a user