fxa/.circleci
Danny Coates aa1dc5b026
revert(node): revert CI and Docker images to node 14
Test stability has dropped with the change to node 16. Until we can resolve it we're reverting to 14. Local dev will continue on 16 in order to be able to fix the problems.
2021-11-01 13:50:43 -07:00
..
README.md chore(ci): update circleci with new base images (#10818) 2021-10-26 09:00:06 -07:00
assert-branch.sh refactor(fxa-circleci): moved fxa-circleci image source 2020-04-30 17:04:51 -07:00
base-install.sh chore(node): upgrade to node 16 (#10799) 2021-10-22 16:10:22 -07:00
build-all.sh feat(docker): publish fxa-mono docker image 2020-08-28 10:10:14 -07:00
build.sh chore(build): stop building docker images for each service by default 2020-10-28 13:07:44 -07:00
config.yml revert(node): revert CI and Docker images to node 14 2021-11-01 13:50:43 -07:00
deploy-all.sh feat(docker): publish fxa-mono docker image 2020-08-28 10:10:14 -07:00
deploy.sh chore(docs): Replace 'master' with 'main' throughout 2020-06-25 13:44:28 -07:00
modules-to-test.js chore(docs): Replace 'master' with 'main' throughout 2020-06-25 13:44:28 -07:00
test-package.sh refactor(packages): use workspace references 2020-05-21 10:57:21 -07:00

README.md

CircleCI

config.yml defines the jobs and workflows of our CircleCI deployment.

Special Cases

fxa-email-service isn't tested for most PRs because it doesn't change often and is relatively resource intensive. In order to trigger these tests the PR branch should be prefixed with email-service-. PRs that change those packages on other branches will (intentionally) fail.

Scripts

This directory contains scripts used by config.yml to run jobs. More general scripts should be located in ../_scripts or in individual package directories.

Conventions

Tests

Packages are tested with ./test-package.sh. The default action is to run:

yarn install
yarn test

Packages may define a scripts/test-ci.sh as a custom test script.

Builds

By default packages are built using docker. The standard Dockerfile is the preferred method. Packages may define a scripts/build-ci.sh as a custom build script.

Deploys

Packages that create docker images are deployed to docker hub.

New packages require username and password environment variables in CircleCI project settings in order to deploy.

Triggering manual jobs

curl -u $CIRCLECI_API_TOKEN \
     -d build_parameters[CIRCLE_JOB]=$JOB_NAME \
     https://circleci.com/api/v1.1/project/github/mozilla/fxa/tree/$GITHUB_BRANCH
  • $CIRCLECI_API_TOKEN is your personal API token from https://app.circleci.com/settings/user/tokens
  • $JOB_NAME is the job to run from config.yml, test-content-server-remote for example
  • $GITHUB_BRANCH is the branch you'd like to build & deploy to docker hub (this may be main)

Local Testing

With the CircleCI CLI you can run some jobs locally. Deploy jobs will fail to run.

For example, to run the test-many job:

circleci config process .circleci/config.yml > .circleci/local.yml
circleci local execute -c .circleci/local.yml --job test-many