addons-server/.circleci/config.yml

673 строки
31 KiB
YAML

# These environment variables must be set in CircleCI UI
#
# DOCKERHUB_REPO - docker hub repo, format: <username>/<repo>
# DOCKER_USER - Login user for docker hub
# DOCKER_PASS - Login password for docker hub user
version: 2.1
orbs:
# This is needed to be able to install Node.js 14 in the primary container,
# which provides python only (the convenience cimg/python:3.9-node provides
# node 16).
node: circleci/node@5.0.0
references:
# We declare the autograph configuration here to be able to fully leverage
# Docker executors. This configuration should be kept in sync with the
# content of `scripts/autograph_localdev_config.yaml`, which is used for
# local dev. Sadly, we cannot "include" this file here.
autograph_config: &autograph_config |
# Note: Most of the configuration here got copied from
# https://github.com/mozilla-services/autograph/blob/master/autograph.yaml
server:
# This port should be perfectly free, the upstream default of 8000 is
# used by django sometimes so let's not do that.
listen: "0.0.0.0:5500"
# cache 500k nonces to protect from authorization replay attacks
noncecachesize: 10
# The keys below are testing keys that do not grant any power
signers:
- id: webextensions-rsa
type: xpi
# The signing parameters for each type of add-on are 'add-on' are
# signed with the OU 'Production' and the provided ID 'extension' are
# signed with the OU 'Mozilla Extensions' and the provided ID 'system
# add-on' are signed with the OU 'Mozilla Components' and the
# provided ID
mode: add-on
recommendation:
path: "mozilla-recommendation.json"
certificate: |
-----BEGIN CERTIFICATE-----
MIIH0zCCBbugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBvDELMAkGA1UEBhMCVVMx
CzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRwwGgYDVQQKExNB
bGxpem9tIENvcnBvcmF0aW9uMSAwHgYDVQQLExdBbGxpem9tIEFNTyBEZXZlbG9w
bWVudDEYMBYGA1UEAxMPZGV2LmFtby5yb290LmNhMS4wLAYJKoZIhvcNAQkBFh9m
b3hzZWMrZGV2YW1vcm9vdGNhQG1vemlsbGEuY29tMB4XDTE3MDMyMTIzNDQwNFoX
DTI3MDMxOTIzNDQwNFowgbwxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQG
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hU5LZ76MS17v3NEPxYpVHxjAotxW
g03HjWTltS8Bgt6u0KFTGJKEUcfwvWKZtjk5Fc1heZ49zh1nU3zo9C/h8iiijTy2
s/YksP6cxveae4b7soN4rD/vnfsmKcG+DnTf6B8Zbm6tI2TneYOfFSCryp+yDnaJ
PIDNiTxNecePOmrD+1ivAEXcoL+e1w==
-----END PRIVATE KEY-----
- id: webextensions-rsa-with-recommendation
type: xpi
# The signing parameters for each type of add-on are 'add-on' are
# signed with the OU 'Production' and the provided ID
# 'add-on-with-recommendation' are signed with the OU 'Production'
# and the provided ID and add a recommendation file 'extension' are
# signed with the OU 'Mozilla Extensions' and the provided ID 'system
# add-on' are signed with the OU 'Mozilla Components' and the
# provided ID 'hotfix' are signed with the OU 'Production' and the ID
# 'firefox-hotfix@mozilla.org'
mode: add-on-with-recommendation
recommendation:
path: "mozilla-recommendation.json"
states:
recommended: true
recommended-android: true
verified: true
line: true
relative_start: 0h
duration: 26298h
# RSA key gen is slow and CPU intensive, so we can optionally
# pregenerate and cache keys with a worker pool
rsacacheconfig:
numkeys: 25
numgenerators: 2
generatorsleepduration: 1m
fetchtimeout: 100ms
statssamplerate: 1m
certificate: |
-----BEGIN CERTIFICATE-----
MIIH0zCCBbugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBvDELMAkGA1UEBhMCVVMx
CzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRwwGgYDVQQKExNB
bGxpem9tIENvcnBvcmF0aW9uMSAwHgYDVQQLExdBbGxpem9tIEFNTyBEZXZlbG9w
bWVudDEYMBYGA1UEAxMPZGV2LmFtby5yb290LmNhMS4wLAYJKoZIhvcNAQkBFh9m
b3hzZWMrZGV2YW1vcm9vdGNhQG1vemlsbGEuY29tMB4XDTE3MDMyMTIzNDQwNFoX
DTI3MDMxOTIzNDQwNFowgbwxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQG
A1UEBxMNTW91bnRhaW4gVmlldzEcM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g03HjWTltS8Bgt6u0KFTGJKEUcfwvWKZtjk5Fc1heZ49zh1nU3zo9C/h8iiijTy2
s/YksP6cxveae4b7soN4rD/vnfsmKcG+DnTf6B8Zbm6tI2TneYOfFSCryp+yDnaJ
PIDNiTxNecePOmrD+1ivAEXcoL+e1w==
-----END PRIVATE KEY-----
authorizations:
- id: alice
key: fs5wgcer9qj819kfptdlp8gm227ewxnzvsuj9ztycsx08hfhzu
signers:
- webextensions-rsa
- id: bob
key: 9vh6bhlc10y63ow2k4zke7k0c3l9hpr8mo96p92jmbfqngs9e7d
signers:
- webextensions-rsa-with-recommendation
###########################################################################
#
# The autograph configuration ends here.
#
###########################################################################
variables:
- &working-directory "~/addons-server"
docker-images:
# These versions should try to match what we run in production.
- &python "cimg/python:3.9"
- &redis "redis:6.2"
- &memcached "memcached:1.4"
- &mysql "mysql:8.0.28"
mysql-config: &mysql-config
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_DATABASE: olympia
defaults: &defaults
working_directory: &working-directory
docker:
- image: *python
defaults-with-services: &defaults-with-services
<<: *defaults
docker:
- image: *python
# Below are services this project depends on. In addition to these
# services, we also need autograph and elasticsearch but not all the
# time, hence the presence of other `defaults-with-*` references.
#
# Most settings below should be kept in sync with `docker-compose.yml`.
- image: *redis
- image: *memcached
- image: *mysql
<<: *mysql-config
defaults-with-elasticsearch: &defaults-with-elasticsearch
<<: *defaults
docker:
- image: *python
- image: *redis
- image: *memcached
- image: *mysql
<<: *mysql-config
- image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3
environment:
# Disable all xpack related features to avoid unrelated logging in
# docker logs. https://github.com/mozilla/addons-server/issues/8887
xpack.security.enabled: false
xpack.monitoring.enabled: false
xpack.graph.enabled: false
xpack.watcher.enabled: false
discovery.type: single-node
cluster.name: default-cluster
ES_JAVA_OPTS: -Xms256m -Xmx256m
defaults-with-autograph: &defaults-with-autograph
<<: *defaults
docker:
- image: *python
- image: *redis
- image: *memcached
- image: *mysql
<<: *mysql-config
- image: mozilla/autograph:3.3.2
command: bash -c 'echo -e "$AUTOGRAPH_CONFIG" > amo_config.yaml && cat amo_config.yaml && /go/bin/autograph -c amo_config.yaml'
environment:
AUTOGRAPH_CONFIG: *autograph_config
defaults-release: &defaults-release
machine:
image: ubuntu-2004:202201-02
working_directory: &working-directory
commands:
make_release:
description: "Builds and pushes a Docker image"
parameters:
dockerfile:
type: string
default: "Dockerfile.deploy"
image_tag:
type: string
default: "latest"
steps:
- run: >
printf '{"commit":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}\n'
"$CIRCLE_SHA1"
"$CIRCLE_TAG"
"$CIRCLE_PROJECT_USERNAME"
"$CIRCLE_PROJECT_REPONAME"
"$CIRCLE_BUILD_URL"
> version.json
- run:
name: Build docker image and push to repo
command: |
docker version
docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
docker build -t app:build -f << parameters.dockerfile >> --label git.commit="$CIRCLE_SHA1" .
docker tag app:build "${DOCKERHUB_REPO}":<< parameters.image_tag >>
docker push "${DOCKERHUB_REPO}":<< parameters.image_tag >>
better_checkout:
description: circle ci checkout step on steroids
parameters:
clone_options:
type: string
default: --depth=1
description: git clone options
fetch_options:
type: string
default: --depth=10
description: git fetch options
steps:
- run:
name: checkout
command: |
#!/bin/sh
set -e
# Workaround old docker images with incorrect $HOME
# check https://github.com/docker/docker/issues/2968 for details
if [ "${HOME}" = "/" ]
then
export HOME=$(getent passwd $(id -un) | cut -d: -f6)
fi
export SSH_CONFIG_DIR="$HOME/.ssh"
echo "Using SSH Config Dir $SSH_CONFIG_DIR"
mkdir -p "$SSH_CONFIG_DIR"
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> "$SSH_CONFIG_DIR/known_hosts"
(umask 077; touch "$SSH_CONFIG_DIR/id_rsa")
chmod 0600 "$SSH_CONFIG_DIR/id_rsa"
(cat $CHECKOUT_KEY > "$SSH_CONFIG_DIR/id_rsa")
export GIT_SSH_COMMAND='ssh -i $SSH_CONFIG_DIR/id_rsa -o UserKnownHostsFile=$SSH_CONFIG_DIR/known_hosts'
# use git+ssh instead of https
git config --global url."ssh://git@github.com".insteadOf "https://github.com" || true
git config --global gc.auto 0 || true
if [ -e .git ]
then
git remote set-url origin "$CIRCLE_REPOSITORY_URL" || true
else
git clone << parameters.clone_options >> "$CIRCLE_REPOSITORY_URL" .
fi
if [ -n "$CIRCLE_TAG" ]
then
git fetch << parameters.fetch_options >> --force origin "refs/tags/${CIRCLE_TAG}"
elif [[ "$CIRCLE_BRANCH" =~ ^pull\/* ]]
then
git fetch << parameters.fetch_options >> --force origin "${CIRCLE_BRANCH}/head:remotes/origin/${CIRCLE_BRANCH}"
else
git fetch << parameters.fetch_options >> --force origin "${CIRCLE_BRANCH}:remotes/origin/${CIRCLE_BRANCH}"
fi
if [ -n "$CIRCLE_TAG" ]
then
git reset --hard "$CIRCLE_SHA1"
git checkout -q "$CIRCLE_TAG"
elif [ -n "$CIRCLE_BRANCH" ]
then
git reset --hard "$CIRCLE_SHA1"
git checkout -q -B "$CIRCLE_BRANCH"
fi
git reset --hard "$CIRCLE_SHA1"
setup_container:
description: common setup for the primary container
parameters:
wait_services:
type: boolean
default: true
install_python_test_dependencies:
type: boolean
default: true
install_node_dependencies:
type: boolean
default: false
update_deps:
type: boolean
default: false
steps:
- better_checkout
- run:
name: Initial setup
command: |
curl -sL https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb --output mysql-apt-config.deb
sudo dpkg -i mysql-apt-config.deb
sudo apt-get update -q
sudo apt-get install -y gettext pngcrush librsvg2-bin libmysqlclient-dev
sudo cp ./docker/etc/mime.types /etc/mime.types
sudo touch /addons-server-docker-container
- node/install:
node-version: '14'
- run:
name: Install dockerize
command: |
wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
environment:
DOCKERIZE_VERSION: v0.6.1
- when:
condition: << parameters.wait_services >>
steps:
- run:
name: Wait for redis
command: dockerize -wait tcp://localhost:6379 -timeout 1m
- run:
name: Wait for mysql
command: dockerize -wait tcp://localhost:3306 -timeout 1m
- run:
name: Wait for memcached
command: dockerize -wait tcp://localhost:11211 -timeout 1m
- when:
condition: << parameters.install_python_test_dependencies >>
steps:
- run: make install_python_test_dependencies
- when:
condition: << parameters.install_node_dependencies >>
steps:
- run: make install_node_dependencies
- when:
condition: << parameters.update_deps >>
steps:
- run: make update_deps
- run:
name: Set environment variables
command: |
echo 'export PYTHONPATH=src' >> $BASH_ENV
# should be executed after all python install commands
- run: pyenv rehash
jobs:
addons-versions-files-ratings:
<<: *defaults-with-services
steps:
- setup_container
- run:
command: pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/addons/ src/olympia/versions/ src/olympia/files/ src/olympia/ratings/
amo-lib-locales-and-signing:
<<: *defaults-with-autograph
steps:
- setup_container:
install_node_dependencies: true
- run:
command: pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/amo/ src/olympia/lib/ src/olympia/signing
environment:
AUTOGRAPH_SERVER_URL: http://127.0.0.1:5500
# After having removed `tox`, we noticed that this job was a lot slower.
# The reason seems to be related to pyenv shims, which add a huge
# overhead to CLIs like `dennis-cmd`. By updating the path below, we
# should use `dennis-cmd` directly instead of the pyenv shim.
- run: echo "export PATH=\"$(pyenv prefix)/bin:$PATH\"" >> $BASH_ENV
- run: bash ./locale/compile-mo.sh ./locale/
- run:
command: pytest -n 2 -m 'needs_locales_compilation' -v src/olympia/
assets:
<<: *defaults-with-services
steps:
- setup_container:
install_python_test_dependencies: false
update_deps: true
- run: make update_assets
- run:
command: pytest -m "static_assets" -v src/olympia/
- run: make run_js_tests
codestyle:
<<: *defaults
steps:
- setup_container:
wait_services: false
install_node_dependencies: true
- run: make setup-codestyle
- run: pyenv rehash
- run: make lint-codestyle
devhub:
<<: *defaults-with-services
steps:
- setup_container:
install_node_dependencies: true
- run:
command: pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/devhub/
docs:
<<: *defaults
steps:
- setup_container:
wait_services: false
install_python_test_dependencies: false
- run: pip install --no-deps -r requirements/docs.txt
- run: make docs
main:
<<: *defaults-with-services
steps:
- setup_container:
install_node_dependencies: true
- run:
command: |
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets and not internal_routes_allowed' \
-v src/olympia/ \
--ignore src/olympia/addons/ \
--ignore src/olympia/devhub/ \
--ignore src/olympia/files/ \
--ignore src/olympia/reviewers/ \
--ignore src/olympia/ratings/ \
--ignore src/olympia/amo/ \
--ignore src/olympia/lib/ \
--ignore src/olympia/signing \
--ignore src/olympia/versions/ \
--ignore src/olympia/zadmin
reviewers-and-zadmin:
<<: *defaults-with-autograph
steps:
- setup_container
- run:
command: pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/reviewers/ src/olympia/zadmin/
environment:
AUTOGRAPH_SERVER_URL: http://127.0.0.1:5500
- run:
name: internal_routes_allowed
command: |
# We need to change the setting in the file because we can't
# override an env variable here, and the next command requires
# `INTERNAL_ROUTES_ALLOWED` to be set to `True`.
sed -i 's/^INTERNAL_ROUTES_ALLOWED.*/INTERNAL_ROUTES_ALLOWED=True/' settings_test.py
pytest -m 'internal_routes_allowed' -v src/olympia/
es-tests:
<<: *defaults-with-elasticsearch
steps:
- setup_container
- run:
name: Wait for elasticsearch
command: dockerize -wait tcp://localhost:9200 -timeout 1m
- run:
command: pytest -m "es_tests and not needs_locales_compilation and not static_assets" -v src/olympia/
release-master:
<<: *defaults-release
steps:
- checkout
- make_release:
image_tag: latest
dockerfile: "Dockerfile.deploy"
release-tag:
<<: *defaults-release
steps:
- checkout
- make_release:
image_tag: "${CIRCLE_TAG}"
dockerfile: "Dockerfile.deploy"
workflows:
version: 2
default-workflow:
jobs:
- addons-versions-files-ratings
- amo-lib-locales-and-signing
- assets
- codestyle
- devhub
- docs
- main
- reviewers-and-zadmin
- es-tests
- release-master:
filters:
branches:
only: master
tags:
ignore: /.*/
- release-tag:
filters:
tags:
only: /.*/
branches:
ignore: /.*/