Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix license headers #28

Merged
merged 1 commit into from
Jul 11, 2024
Merged
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
2 changes: 1 addition & 1 deletion actions.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
grant-admin-role:
description: >
Expand Down
2 changes: 1 addition & 1 deletion charmcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
type: "charm"
bases:
Expand Down
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
options:
clustering:
Expand Down
2 changes: 1 addition & 1 deletion generate-src-docs.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

lazydocs --no-watermark --output-path src-docs src/*
2 changes: 1 addition & 1 deletion mattermost.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
FROM ubuntu:focal@sha256:ed4a42283d9943135ed87d4ee34e542f7f5ad9ecf2f244870e23122f703f91c2 AS canonical_flavour_builder

Expand All @@ -9,7 +9,7 @@

# Update ca-certificates before running git clone to ensure certs are up to date.
# We need version 16+ of NodeJS for `make package` to succeed.
RUN apt-get -y update && \

Check warning on line 12 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check warning on line 12 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
apt-get -y upgrade && \
apt-get -y --no-install-recommends install \
ca-certificates && \
Expand All @@ -30,9 +30,9 @@
# issues in the build process. This patch will limit the open sockets connected
# to the http proxy server down to 15. The number can be adjusted by the
# NPM_HTTPS_PROXY_AGENT_MAX_SOCKETS environment variable.
COPY files/canonical_flavour/https-proxy-agent.patch patch/https-proxy-agent.patch

Check warning on line 33 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

`COPY` to a relative destination without `WORKDIR` set.

RUN curl -sSL https://github.com/TooTallNate/node-https-proxy-agent/archive/refs/tags/5.0.1.tar.gz -o node-https-proxy-agent.tar.gz && \

Check warning on line 35 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
echo "36ee41503f9245b2b8ce3e4725ac966cf9a391f4 node-https-proxy-agent.tar.gz" | shasum -c && \
tar -xf node-https-proxy-agent.tar.gz

Expand All @@ -51,7 +51,7 @@

RUN git clone -b v${mattermost_version} https://github.com/mattermost/mattermost-webapp

RUN cd mattermost-webapp && \

Check warning on line 54 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Use WORKDIR to switch to a directory
git apply /patch/themes.patch && \
npm config set progress=false loglevel=info && \
make dist
Expand All @@ -72,12 +72,12 @@
SHELL ["/bin/bash", "-c"]

# xmlsec1 needed if UseNewSAMLLibrary is set to false (the default)
RUN apt-get -qy update && \

Check notice on line 75 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Avoid additional packages by specifying `--no-install-recommends`

Check notice on line 75 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Delete the apt-get lists after installing something

Check warning on line 75 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
apt-get -qy upgrade && \
apt-get -qy install curl xmlsec1 && \
rm -f /var/lib/apt/lists/*_*

RUN mkdir -p /mattermost/data /mattermost/plugins /mattermost/client/plugins && \

Check warning on line 80 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
set -o pipefail && \
case $edition in \
enterprise) \
Expand All @@ -100,24 +100,24 @@
fi

# Enable prepackaged plugin
RUN if [ "$image_flavour" = canonical ]; then \

Check notice on line 103 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Multiple consecutive `RUN` instructions. Consider consolidation.
tar -C /mattermost/plugins -xvzf /mattermost/prepackaged_plugins/mattermost-plugin-github-v2.1.4-linux-amd64.tar.gz ; \
fi

# Enable prepackaged plugin
RUN if [ "$image_flavour" = canonical ]; then \

Check notice on line 108 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Multiple consecutive `RUN` instructions. Consider consolidation.
tar -C /mattermost/plugins -xvzf /mattermost/prepackaged_plugins/mattermost-plugin-gitlab-v1.6.0-linux-amd64.tar.gz ; \
fi

# Download and enable third-party plugin
RUN if [ "$image_flavour" = canonical ]; then \

Check warning on line 113 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Use WORKDIR to switch to a directory

Check warning on line 113 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
cd /mattermost/plugins && \
set -o pipefail && \
curl -L https://github.com/matterpoll/matterpoll/releases/download/v1.4.0/com.github.matterpoll.matterpoll-1.4.0.tar.gz | tar -xvz ; \
fi

# Download and enable third-party plugin
RUN if [ "$image_flavour" = canonical ]; then \

Check warning on line 120 in mattermost.Dockerfile

View workflow job for this annotation

GitHub Actions / unit-tests / Dockerfile lint

Use WORKDIR to switch to a directory
cd /mattermost/plugins && \
set -o pipefail && \
curl -L https://github.com/moussetc/mattermost-plugin-giphy/releases/download/v2.1.1/com.github.moussetc.mattermost.plugin.giphy-2.1.1.tar.gz | tar -xvz ; \
Expand Down
2 changes: 1 addition & 1 deletion metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
name: mattermost-k8s
display-name: Mattermost
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

[tool.bandit]
Expand Down
2 changes: 1 addition & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

import logging
Expand Down
2 changes: 1 addition & 1 deletion src/environment.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Generate container app environment based on charm configuration."""
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

import json
Expand Down
2 changes: 1 addition & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

from copy import deepcopy
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

"""General configuration module for tests."""
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

"""Fixtures for Mattermost charm integration tests."""
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/localstack-installation.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

pip install pip --upgrade
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_charm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

import json
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

"""Some utility functions used in integration tests."""
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
2 changes: 1 addition & 1 deletion tests/unit/test_charm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

import unittest
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_environment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

import os
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

import unittest
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

import unittest
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Canonical Ltd.
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

[tox]
Expand Down
Loading