Commit Graph

38 Commits

Author SHA1 Message Date
Anders Kaseorg bfa82a70c8 ci: Remove Ubuntu 14.04 (trusty) from CI.
Tweaked by tabbott to improve our CI docs discussion of these.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-06-26 11:01:13 -07:00
Anders Kaseorg ae524b677d ci: Move backend and production tests to Ubuntu 16.04 (xenial).
This is preparation for dropping support for Trusty in CI.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-05-24 17:07:15 -07:00
Tim Abbott c2baca2c78 ci: Don't run codecov on additional platforms.
The coverage data for the platform where we run the backend+frontend
tests should be complete, so there's no reason to upload coverage data
for the other platforms.

Hopefully this change will decrease the likelihood of codecov
producing flaky results.
2019-05-20 11:02:58 -07:00
Mateusz Mandera 63c170c390 circleci: Fix redis on Bionic.
Fixes #11079.
Because of "service redis-server start" not working properly, in "do
Bionic hack" another instance of the server was being started. However,
once in a while this would fail for unknown reasons causing flakes in
tests involving redis. The cause of the service not starting was the
error:
::1:6379: bind: Cannot assign requested address
(see https://github.com/antirez/redis/issues/3241)
This is fixed by editing /etc/redis/redis.conf to not attempt binding
on IPv6. We change "do Bionic hack" to a simple sed command,
changing the appropriate line in the file.
By default, the line is "bind 127.0.0.1 ::1".
We change it to "bind 0.0.0.0".
2019-05-03 11:33:39 -07:00
Vishnu Ks e3b4883386 circleci: Downgrade to 2.0.
We initially upgraded to 2.1 under the assumption that 2.1 was necessary
to enable pipelines. This turns out to be not true. Pipelines can be enabled
from 2.0 as well. On the other hand upgrading to 2.1 requires enabling
pipelines. This resulted in broken builds across many forks that has enabled
CircleCI and not pipelines. We are also not making use of any 2.1 features
like reusable orbs, commands, and executors currently. Downgrading to 2.0 will
also allow us to use "." in the job names which makes them more readable.
2019-04-10 10:22:54 -07:00
Vishnu Ks 713999556d circleci: Move to CircleCI 2.1 format.
This contains the minimum changes required to move to the CircleCI 2.1
configuration file format. In 2.1 job names should not contain "." in
them.

Moving to 2.1 will allow us to enable enable pipelines from CircleCI
project settings UI. Once pipeline is enabled auto-cancellation of
redundant workflows can be also enabled from the CircleCI UI.

See https://circleci.com/docs/2.0/build-processing/
2019-04-04 13:02:28 -07:00
Vishnu Ks cddce5bd34 docs: Rename travis.md to continuous integration and add more content. 2018-12-29 15:26:36 -08:00
rht 05c4855cc9 circleci: Merge install dependencies step of trusty setup into the rest. 2018-12-10 17:06:37 -08:00
rht de9cefff8c circleci: Use CIRCLE_JOB env var for distro in cache filenames.
This lets us remove the ugly _dist.txt hack from our CircleCI
configuration.
2018-12-10 15:12:47 -08:00
Vishnu Ks a86faecff5 tools: Rename tools/travis directory to tools/ci. 2018-12-10 11:07:26 -08:00
Tim Abbott 0ff3a7da05 circleci: Document the story with hashing the distribution name. 2018-12-05 12:03:41 -08:00
rht 3c91c9c927 circleci: Remove unused spaces and a useless comment.
With the new names, we really don't need the comment.
2018-12-05 12:03:17 -08:00
rht 93ef3795b4 circleci: Use alias for save cache. 2018-12-05 11:48:41 -08:00
rht d2454142da circleci: Use alias for restore cache. 2018-12-05 11:48:41 -08:00
rht 53ec6ab45e circleci: Use alias for upload coverage report. 2018-12-05 11:48:41 -08:00
rht badc0eff0d circleci: Use alias for run frontend tests. 2018-12-05 11:48:41 -08:00
rht 83424381cd circleci: Use alias for run backend tests. 2018-12-05 11:48:41 -08:00
rht c476f0eca0 circleci: Use alias for install dependencies. 2018-12-05 11:48:41 -08:00
rht 2fe128d8e9 circleci: Use alias for create cache directories. 2018-12-05 11:48:41 -08:00
Vishnu Ks a46af418d4 circleci: Add support for Ubuntu Bionic. 2018-06-01 18:02:50 -07:00
Greg Price e891078d94 circleci: Bump the Xenial and Trusty base images to fresh builds.
This will save us a bit of time running apt upgrades at the start of
each build; looks like that's been about 15-20s for recent builds.
2018-06-01 16:52:18 -07:00
Tim Abbott eee221123f CircleCI: Add apt-get update. 2018-05-10 14:27:35 -07:00
Puneeth Chaganti 26dfa3266b ci: Make cache keys depend on checksums of dependency manifests
Caches in Circle are immutable -- even if a path in a cache changes in builds
after the cache was created, the cache is not updated if it already exists. This
was making the zulip-venv-cache and zulip-npm-cache directories useless on
Circle.

This commit changes the cache keys to depend on the checksums of the dependency
manifests (requirements/{dev,thumbor}.txt, package.json and yarn.lock). This
would ensure that the caches are updated when the environments change. It may
result in the occasional build being "uncached" -- when a dependency manifest
changes -- but builds without such changes will be much faster, and such builds
are a majority.
2018-04-16 16:49:41 -07:00
Priyank d4b88e86cc yarn: Revert back to v0.27.5.
Revert yarn version back due to some issue with new version that causes
permission issues in ~/.config/yarn directory.

Related discussion: https://chat.zulip.org/#narrow/stream/21-provision-help/topic/EACCES.3A.20permission.20denied.2C.20scandir.20'.2Fhome.2Fvagrant.2F.2Econfig.2Fya
2018-04-12 10:18:59 -07:00
Priyank ee078c372f install-node: Upgrade node, yarn, and nvm.
node -> v8.9.4
yarn -> 1.5.1
nvm -> 0.33.8

Also updates a test in timerender.js which depends on time
provided by node which is now changed in newer release.

Some changes have been made in circeci script, we just create ~/.config
directory and chown it to circleci user so installing new version of yarn
does not cause any ci failure on circleci during provision.
2018-04-09 13:56:48 -07:00
Greg Price badbd744f6 travis: Cut webhook config pointing at zulipbot.
We haven't actually been using this zulipbot feature for a long time
(haven't applied the `travis updates` label which it looks for.)
Rather than port the config to CircleCI, just cut it for now; we can
always add something like it back if we start using it.
2018-01-31 11:07:38 -08:00
Greg Price ba7d06eb12 circleci: Bump the Trusty image to one from the new Dockerfile.
The new Dockerfile is barely different from the old and shouldn't
matter, but in the unlikely case it does, best to find out promptly.
2018-01-31 10:53:13 -08:00
Greg Price 1d8ce4bdad circleci: Upload to codecov on xenial too.
Only takes about 11 seconds; and there may be some codepaths that are
exercised on one release and not the other.
2018-01-31 10:53:13 -08:00
Vishnu Ks f8227dc0c3 circleci: Set working_directory to zulip.
Doesn't do much except that when you ssh
into circleci you get a directory called
zulip instead of repo.
2018-01-31 10:53:13 -08:00
Vishnu Ks d6ffd4d220 circleci: Run xenial py3.5 backend tests alongside trusty. 2018-01-31 10:53:13 -08:00
Vishnu Ks 57d2d3ada5 circleci: Upload coverage reports to codecov.io.
The Travis config does this by a `pip install codecov` in setup and
running the resulting `codecov` command at the end.  That risks
confusion because it makes the library look like something we might
be using *during* the tests to collect coverage information.
Instead, install and run codecov together at the end.

(The docs also suggest using their bash-based uploader instead;
but following those directions seems to result in coverage.xml
not getting included (maybe not even built), and no coverage data
getting uploaded for Python source files, only JavaScript.  Not
sure why that is, but using the pip package is fine.)

Also, because this step is inherently about talking to a
third-party service whose reliability we can't control, and because
it's purely a reporting step that happens after our actual test
suite has succeeded, don't fail if it fails; just print a message.
(I'd prefer a somewhat louder message, like turning that step
yellow or something in the Circle web UI, but Circle doesn't offer
an option like that.  If the coverage reports start consistently
failing for some reason, then if we're actually reading them we'll
notice anyway.)

[greg: Edited step name and error message; wrote this commit message.]
2018-01-29 18:31:53 -08:00
Vishnu Ks ad7c8237b9 circleci: Run frontend tests in circleci. 2018-01-08 19:38:23 -08:00
Greg Price a0ea206379 circleci: cut two TODO comments better tracked elsewhere
These are part of the checklist in #7748.
2018-01-08 19:38:23 -08:00
Vishnu Ks f743eeb1eb circleci: Set up locale en_US.UTF-8.
See comment for motivation and what's known.

[greg: Added comment, summarizing Vishnu's results from testing.]
2017-12-20 19:18:29 -08:00
Greg Price 9ce080ebb1 circleci: Remove Circle-created gitconfig file.
[Investigation by hackerkid.]
2017-12-18 21:42:00 -08:00
Greg Price ea589e8283 circle: Bump base image version.
This new base image just comes from me doing a fresh `docker build`
and uploading the result.  That gives it fresher versions of our
APT dependencies than the image I built a couple of months ago,
speeding up provision by giving it less to install.
2017-12-01 17:16:51 -08:00
Greg Price 58db3c13cb circle: Bump cache version.
This will store a fresh version of the cached trees to the
new ...-base2 keys, and then the *next* build will use those
instead of the ...-base1 keys.
2017-12-01 16:11:25 -08:00
Greg Price b9990941d6 circle: Draft a config for running our builds in CircleCI.
From just my experience attempting this change, I've been impressed
with the very fast turnaround in CircleCI for a change -- from `git
push` to the build starting is usually just a couple of seconds.

It also looks like we get much clearer control over the caching
system, and the setup of the environment via a Docker image of our
choice, which can help avoid most of the several minutes Travis takes
to set up our environment before it actually starts running the tests
themselves.

Plus it supports fine-grained parallelism, e.g. by test file:
https://circleci.com/docs/2.0/parallelism-faster-jobs/

So we can probably get much faster builds by making this switch.
Because the environment is much more transparent and even under
our control, I'm also hopeful for more reliable builds.
2017-12-01 15:19:57 -08:00