Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
end_of_line = lf
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[[shell]]
binary_next_line = true
switch_case_indent = true

[*.{yaml,yml}]
indent_size = 2
14 changes: 14 additions & 0 deletions .github/workflows/dockerfile-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Dockerfile lint

on:
pull_request:
branches:
- main

jobs:
hadolint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: hadolint/hadolint-action@v3.1.0
71 changes: 71 additions & 0 deletions .github/workflows/helm-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: Helm lint and test

on:
pull_request:
branches:
- main

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v4.2.0
with:
version: v3.17.0

- uses: actions/setup-python@v5.3.0
with:
python-version: "3.x"
check-latest: true

- name: Run helm-docs
uses: losisin/helm-docs-github-action@v1
with:
fail-on-diff: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.7.0
with:
version: 3.14.0
yamllint_version: 1.37.1
yamale_version: 6.0.0

- name: Set up helm repos
run: |
helm repo add groundhog2k https://groundhog2k.github.io/helm-charts/

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }} --lint-conf lintconf.yaml --github-groups

- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1

- name: Run chart-testing (install)
id: chart-testing-install
if: steps.list-changed.outputs.changed == 'true'
run: ct install --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }} --github-groups --skip-clean-up

- name: Fetch logs
if: always()
run: |
namespace=$(helm list --all-namespaces --output json \
| jq -r '[.[] | select(.namespace | startswith("zulip-"))][0].namespace')
pod=$(kubectl get pods -n "$namespace" -l app.kubernetes.io/name=zulip --output name)
kubectl -n "$namespace" exec -it "$pod" -c zulip -- cat /var/log/zulip/errors.log
14 changes: 14 additions & 0 deletions .github/workflows/shell-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Shell check and lint

on:
pull_request:
branches:
- main

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: luizm/action-sh-checker@master
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ENV LANG="C.UTF-8"

ARG UBUNTU_MIRROR

# hadolint ignore=DL3005,DL3008,DL3009
RUN { [ ! "$UBUNTU_MIRROR" ] || sed -i "s|http://\(\w*\.\)*archive\.ubuntu\.com/ubuntu/\? |$UBUNTU_MIRROR |" /etc/apt/sources.list; } && \
apt-get -q update && \
apt-get -q dist-upgrade -y && \
Expand All @@ -29,8 +30,7 @@ WORKDIR /home/zulip
ARG ZULIP_GIT_URL=https://github.com/zulip/zulip.git
ARG ZULIP_GIT_REF=11.4

RUN git clone "$ZULIP_GIT_URL" -b "$ZULIP_GIT_REF" && \
cd zulip
RUN git clone "$ZULIP_GIT_URL" -b "$ZULIP_GIT_REF"

WORKDIR /home/zulip/zulip

Expand All @@ -53,12 +53,12 @@ COPY custom_zulip_files/ /root/custom_zulip

ARG CUSTOM_CA_CERTIFICATES

WORKDIR /root
RUN \
# Make sure Nginx is started by Supervisor.
dpkg-divert --add --rename /etc/init.d/nginx && \
ln -s /bin/true /etc/init.d/nginx && \
mkdir -p "$DATA_DIR" && \
cd /root && \
tar -xf zulip-server-docker.tar.gz && \
rm -f zulip-server-docker.tar.gz && \
mv zulip-server-docker zulip && \
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ services:
- "80:80"
- "443:443"
environment:
MANUAL_CONFIGURATION: True
## See https://github.com/zulip/docker-zulip#configuration for
## details on this section and how to discover the many
## additional settings that are supported here.
Expand Down
Loading
Loading