Open nmaludy opened 5 years ago
@Kami @blag if you guys have any thoughts on this, i'd really appreciate it. I'm trying to get away from our own fork of this CI repo and would like to make it easier for pack developers to start testing locally (common problem i've seen on Slack)
Summary
We maintain our own semi-fork of this repo at https://github.com/EncoreTechnologies/ci-stackstorm The reason for this is because this repo isn't great at running from a developers laptop. Specifically it creates directories the ~/ci and ~/virtualenv, along with several other problems (outlined below).
Goals
Current problems/challenges/etc
Below is a list of things we had to change from these Makefiles and scripts to get the testing to work on a developers laptop:
CI repo
https://github.com/StackStorm-Exchange/ci/blob/master/.circleci/config.yml explicitly sets up the CI repo in
~/ci
and and virtualenv in~/virtualenv
. This leads to potential issues when multiple packs are tested on a single system, specifically around the~/virtualenv
. We've had cases where a user forgot to add in a dependency intorequirements.txt
and because the virtualenv was already setup in~/virtualenv
from another packs' run, we never noticed the problem until we had deployed the pack to our staging environment.Proposed Changes
ci
repo and then executes the tests. This Makefile is designed to be kicked off by a user and can coordinate all steps needed to happen in order to run tests. Basically, merge functionality from.circleci/config.yml
,.circle/dependencies
,.circle/test
together into the Makefile../ci
inside the pack's directory instead of~/ci
. Cloning locally means each pack has their own copy when testing against multiple packs on a single machine (preventing file corruption issues).Dependencies
The
dependency
script that is run by this CI repo has a couple problems:/home/circleci/ci
apt-get
~/virtualenv
Proposed Changes
./ci
inside the pack's directory instead of~/ci
or/home/circleci/ci
./ci/virtualenv
inside the pack's directory instead of~/virtualenv
apt-get
oryum
commands.packs-resource-register requires MongoDB
Currently the
packs-resource-register
test requires that a MongoDB instance be running. Unless the user has a docker up and a MongoDB container running, this test is hard to run.Proposed Changes