mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
github-actions: Add bionic and focal production install jobs.
We remove the "Do memcached hack" step from CircleCI when migrating this job because a fix has been made upstream.
This commit is contained in:
committed by
Tim Abbott
parent
23372a49e1
commit
3ab53c6a83
83
.github/workflows/production-suite.yml
vendored
83
.github/workflows/production-suite.yml
vendored
@@ -77,3 +77,86 @@ jobs:
|
||||
with:
|
||||
name: production-tarball
|
||||
path: /tmp/production-build
|
||||
|
||||
production_install:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- docker_image: mepriyank/actions:bionic
|
||||
name: Bionic Production Install
|
||||
is_bionic: true
|
||||
os: bionic
|
||||
|
||||
- docker_image: mepriyank/actions:focal
|
||||
name: Focal Production Install
|
||||
is_focal: true
|
||||
os: focal
|
||||
|
||||
name: ${{ matrix.name }}
|
||||
container: ${{ matrix.docker_image }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: production_build
|
||||
|
||||
steps:
|
||||
- name: Download built production tarball
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: production-tarball
|
||||
path: /tmp
|
||||
|
||||
- name: Add required permissions and setup
|
||||
run: |
|
||||
# This is the GitHub Actions specific cache directory the
|
||||
# the current github user must be able to access for the
|
||||
# cache action to work. It is owned by root currently.
|
||||
sudo chmod -R 0777 /__w/_temp/
|
||||
|
||||
# Create the zulip directory that the tools/ci/ scripts needs
|
||||
mkdir -p /home/github/zulip
|
||||
|
||||
# Since actions/download-artifact@v2 loses all the permissions
|
||||
# of the tarball uploaded by the upload artifact fix those.
|
||||
chmod +x /tmp/production-extract-tarball
|
||||
chmod +x /tmp/production-upgrade-pg
|
||||
chmod +x /tmp/production-install
|
||||
chmod +x /tmp/production-verify
|
||||
|
||||
- name: Create cache directories
|
||||
run: |
|
||||
dirs=(/srv/zulip-{npm,venv,emoji}-cache)
|
||||
sudo mkdir -p "${dirs[@]}"
|
||||
sudo chown -R github "${dirs[@]}"
|
||||
|
||||
- name: Restore node_modules cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /srv/zulip-npm-cache
|
||||
key: v1-yarn-deps-${{ matrix.os }}-${{ hashFiles('package.json') }}-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: v1-yarn-deps-${{ matrix.os }}
|
||||
|
||||
- name: Do Bionic hack
|
||||
if: ${{ matrix.is_bionic }}
|
||||
run: |
|
||||
# Temporary hack till `sudo service redis-server start` gets fixes in Bionic. See
|
||||
# https://chat.zulip.org/#narrow/stream/3-backend/topic/Ubuntu.20bionic.20CircleCI
|
||||
sudo sed -i '/^bind/s/bind.*/bind 0.0.0.0/' /etc/redis/redis.conf
|
||||
|
||||
- name: Production extract tarball
|
||||
run: mispipe "/tmp/production-extract-tarball 2>&1" ts
|
||||
|
||||
- name: Install production
|
||||
run: |
|
||||
sudo service rabbitmq-server restart
|
||||
sudo mispipe "/tmp/production-install 2>&1" ts
|
||||
|
||||
- name: Verify install
|
||||
run: sudo mispipe "/tmp/production-verify 2>&1" ts
|
||||
|
||||
- name: Upgrade postgresql
|
||||
if: ${{ matrix.is_bionic }}
|
||||
run: sudo mispipe "/tmp/production-upgrade-pg 2>&1" ts
|
||||
|
||||
- name: Verify install after upgrading postgresql
|
||||
if: ${{ matrix.is_bionic }}
|
||||
run: sudo mispipe "/tmp/production-verify 2>&1" ts
|
||||
|
Reference in New Issue
Block a user